Example #1
0
 /**
  * Deletes a key from shared memory
  *
  * @param Mixed $key The key to look up
  * @return Boolean
  */
 public function clear($key)
 {
     $key = \r8\SysV\Semaphore::makeKey($key);
     $resource = $this->getResource();
     @shm_remove_var($resource, $key);
     return $this;
 }
Example #2
0
 public function testMakeKey()
 {
     $this->assertEquals(379708464, \r8\SysV\Semaphore::makeKey("Some Key"));
     $this->assertEquals(848621046, \r8\SysV\Semaphore::makeKey(new \r8\Seed("Test")));
     $this->assertEquals(11235813, \r8\SysV\Semaphore::makeKey(11235813));
 }