当前位置: 首页>>代码示例>>PHP>>正文


PHP shm_remove_var函数代码示例

本文整理汇总了PHP中shm_remove_var函数的典型用法代码示例。如果您正苦于以下问题:PHP shm_remove_var函数的具体用法?PHP shm_remove_var怎么用?PHP shm_remove_var使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了shm_remove_var函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: unlock

 /**
  * Unlock process
  *
  * @return Mage_Index_Model_Process
  */
 public function unlock()
 {
     $this->_getSemIdentifier();
     shm_remove_var($this->_shmId, $this->getIndexerCodeCrc());
     @sem_release($this->_getSemIdentifier());
     $this->_isLocked = false;
 }
开发者ID:ThomasNegeli,项目名称:Magento-FastIndexer,代码行数:12,代码来源:Semaphore.php

示例2: createUnlock

 /**
  * (non-PHPdoc)
  * @see Lexik\Bundle\MaintenanceBundle\Drivers.AbstractDriver::createUnlock()
  */
 protected function createUnlock()
 {
     if ($this->shmId) {
         return shm_remove_var($this->shmId, self::VARIABLE_KEY);
     }
     return false;
 }
开发者ID:ashutosh-srijan,项目名称:findit_akeneo,代码行数:11,代码来源:ShmDriver.php

示例3: get

 /**
  * {@inheritdoc}
  */
 public function get()
 {
     if (shm_has_var($this->shared_memory_segment, self::$SEGMENT_VAR_ID)) {
         $data = shm_get_var($this->shared_memory_segment, self::$SEGMENT_VAR_ID);
         shm_remove_var($this->shared_memory_segment, self::$SEGMENT_VAR_ID);
         return $data;
     }
 }
开发者ID:vatson,项目名称:isolated-callback,代码行数:11,代码来源:SharedMemory.php

示例4: del

 /**
  * Delete shared memory var
  */
 public function del()
 {
     sem_acquire($this->__mutex);
     //block until released
     @shm_remove_var($this->__shm, $this->__key);
     sem_release($this->__mutex);
     //release mutex
 }
开发者ID:nejtr0n,项目名称:shmestage,代码行数:11,代码来源:SharedMemory.php

示例5: del

 public function del($key)
 {
     if ($this->has($key)) {
         return shm_remove_var($this->shm, $this->shm_key($key));
     } else {
         return false;
     }
 }
开发者ID:millken,项目名称:ypf,代码行数:8,代码来源:Shm.php

示例6: remove

 public function remove(string $key) : bool
 {
     if (isset($this->_cache[$key])) {
         unset($this->_cache[$key]);
     }
     $key = crc32($key);
     if (shm_has_var($this->_shmid, $key)) {
         return shm_remove_var($this->_shmid, $key);
     } else {
         return false;
     }
 }
开发者ID:boyxp,项目名称:bluefin-base,代码行数:12,代码来源:shm.php

示例7: delete

 /**
  * @param int $key
  *
  * @throws \Exception
  * @return $this
  * @author Yohann Marillet
  */
 public function delete($key = 1)
 {
     $res = false;
     if ($this->has($key, true)) {
         $value = $this->get($key, true);
         $res = shm_remove_var($this->segment, $key);
     }
     if (!$res) {
         throw new \Exception('Cannot delete data in semaphore');
     }
     return $this;
 }
开发者ID:ymarillet,项目名称:sknife,代码行数:19,代码来源:SemaphoreShm.php

示例8: unlink

 public function unlink($key)
 {
     try {
         $shm = shm_attach($this->id, self::SEGMENT_SIZE, HESPER_IPC_PERMS);
     } catch (BaseException $e) {
         return false;
     }
     try {
         $result = shm_remove_var($shm, $key);
     } catch (BaseException $e) {
         // non existent key
         $result = false;
     }
     shm_detach($shm);
     return $result;
 }
开发者ID:justthefish,项目名称:hesper,代码行数:16,代码来源:SharedMemorySegmentHandler.php

示例9: set

 /**
  * @param string $varName
  * @param mixed $value
  */
 public function set($varName, $value)
 {
     $this->loadVars();
     $varId = array_search($varName, $this->varNames);
     if (false === $varId) {
         shm_put_var($this->memory, count($this->varNames) + 2, $value);
         $this->varNames[] = $varName;
         if ($this->lock->lock()) {
             shm_put_var($this->memory, self::SID_VARS, $this->varNames);
             $this->lock->unlock();
         }
     } else {
         if ($this->lock->lock()) {
             if (is_null($value)) {
                 shm_remove_var($this->memory, $varId + 2);
                 unset($this->varNames[$varId]);
                 shm_put_var($this->memory, self::SID_VARS, $this->varNames);
             } else {
                 shm_put_var($this->memory, $varId + 2, $value);
             }
             $this->lock->unlock();
         }
     }
 }
开发者ID:CrakLabs,项目名称:ipc-component,代码行数:28,代码来源:ShmMemory.php

示例10: delete

 /**
  * Delete data from storage
  * @param string $k
  * @return bool
  */
 public function delete($k)
 {
     $key = $this->__hashcode($k);
     return @shm_remove_var($this->db, $key);
 }
开发者ID:liningwang,项目名称:camera-beijing,代码行数:10,代码来源:Sysv.php

示例11: destroy

 public function destroy()
 {
     if (shm_has_var($this->shm, 1)) {
         shm_remove_var($this->shm, 1);
     }
     shm_remove($this->shm);
 }
开发者ID:straiway,项目名称:fmt,代码行数:7,代码来源:csp.php

示例12: delete

 /**
  * Deletes a cache entry.
  *
  * @param string $id cache id
  * @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise.
  */
 public function delete($id)
 {
     return shm_remove_var($this->shmId, $this->forgeKey($id));
 }
开发者ID:jiangtong1125,项目名称:Zebra-Multi-Process,代码行数:10,代码来源:SHMCache.php

示例13: __unset

 public function __unset($name)
 {
     $name = $this->intkey($name);
     shm_remove_var($this->ipc, $name);
 }
开发者ID:Victopia,项目名称:prefw,代码行数:5,代码来源:SharedMemory.php

示例14: delete

 /**
  * (non-PHPdoc)
  * @see \parallely\TransportInterface::delete()
  */
 public function delete($sId)
 {
     $this->_prepare();
     $sId = crc32($sId);
     if (empty($this->_rShared) !== true and shm_has_var($this->_rShared, $sId) === true) {
         shm_remove_var($this->_rShared, $sId);
     }
     return $this;
 }
开发者ID:hpbuniat,项目名称:parallely,代码行数:13,代码来源:Sharedmemory.php

示例15: delete

 /**
  * @param      $key
  *
  * @return bool
  */
 public function delete($key)
 {
     return shm_remove_var(self::$shm_id, $key);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:9,代码来源:class.ilShm.php


注:本文中的shm_remove_var函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。