function delete() { if ($this->shm) { sem_acquire($this->sem()); try { $this->shm->delete(); sem_release($this->sem()); } catch (Exception $e) { sem_release($this->sem()); } } $this->logger->debug(sprintf("Delete semaphore (key: 0x%08x)", $this->semKey)); sem_remove($this->sem()); if (isset($e)) { throw $e; } }
function endForking() { try { $this->processPool->workQueue->delete(); } catch (Exception $ignore) { } if ($this->worker) { try { $this->worker->endForking(); } catch (Exception $workerEx) { } } try { $this->shm->delete(); } catch (Exception $ignore) { } if (isset($workerEx)) { throw $workerEx; } }
function delete() { $this->logger->debug(sprintf("Delete shm set (key: 0x%08x)", $this->shm->key)); if (!sem_acquire($this->sem)) { throw new Scalr_System_Ipc_Exception("Cannot acquire semaphore"); } try { $this->shm->delete(); unset($this->shm); } catch (Exception $ignore) { } sem_release($this->sem); sem_remove($this->sem); }
function _cleanup() { if (!$this->cleanupComplete && posix_getpid() == $this->poolPid) { try { $this->shm->delete(); } catch (Exception $ignore) { } if ($this->childEventQueue) { try { $this->childEventQueue->delete(); } catch (Exception $ignore) { } } if ($this->workersStat) { try { $this->workersStat->delete(); } catch (Exception $ignore) { } } $this->cleanupComplete = true; } }