示例#1
0
 /**
  * @param array $resources
  */
 private function releaseResources(array $resources)
 {
     foreach ($resources as $resource) {
         $this->kv->delete($this->lockPath . $resource);
     }
     $this->session->destroy($this->sessionId);
 }
示例#2
0
 /**
  * Release resources if they were aquired
  */
 public function release()
 {
     if ($this->sessionId) {
         foreach ($this->resources as $resource) {
             $this->kv->delete($this->getResourceKey($resource, $this->sessionId));
         }
         $this->session->destroy($this->sessionId);
         $this->sessionId = null;
     }
 }