Пример #1
0
 /**
  * Shut down the mutex client.
  *
  * Be sure to release all locks you acquired before,
  * so other clients will be able to acquire them.
  *
  * @return Promise
  */
 public function shutdown() : Promise
 {
     cancel($this->watcher);
     $promises = [$this->std->close()];
     foreach ($this->busyConnections as $connection) {
         $promises[] = $connection->close();
     }
     foreach ($this->readyConnections as list($time, $connection)) {
         $promises[] = $connection->close();
     }
     return all($promises);
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function del($key)
 {
     return $this->client->del($key);
 }