Dep: update
주로 PHAN
This commit is contained in:
Vendored
+14
@@ -50,6 +50,19 @@ final class Lock implements LockInterface, LoggerAwareInterface
|
||||
$this->logger = new NullLogger();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function __sleep()
|
||||
{
|
||||
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
|
||||
}
|
||||
|
||||
public function __wakeup()
|
||||
{
|
||||
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
|
||||
}
|
||||
|
||||
/**
|
||||
* Automatically releases the underlying lock when the object is destructed.
|
||||
*/
|
||||
@@ -67,6 +80,7 @@ final class Lock implements LockInterface, LoggerAwareInterface
|
||||
*/
|
||||
public function acquire($blocking = false): bool
|
||||
{
|
||||
$this->key->resetLifetime();
|
||||
try {
|
||||
if ($blocking) {
|
||||
if (!$this->store instanceof StoreInterface && !$this->store instanceof BlockingStoreInterface) {
|
||||
|
||||
Reference in New Issue
Block a user