Exemplo n.º 1
0
 /**
  * Halt execution and wait for target process to finish
  *
  * @param Process $process
  */
 public function resolve(Process $process)
 {
     $options = $process->getOptions();
     $promise = array_key_exists(self::PROMISE_KEY, $options) ? $options[self::PROMISE_KEY] : null;
     if ($promise instanceof PromiseInterface) {
         $promise->wait(false);
     }
     $this->queue->remove($process);
 }
Exemplo n.º 2
0
 /**
  * Test removing key not in collection
  *
  * @return void
  */
 public function testRemoveUnsetElement()
 {
     $success = $this->collection->remove(7);
     $this->assertFalse($success);
 }