Thread::start PHP Method

start() public method

Will start a new Thread to execute the implemented run method
public start ( integer $options = PTHREADS_INHERIT_ALL ) : boolean
$options integer An optional mask of inheritance constants, by default PTHREADS_INHERIT_ALL
return boolean A boolean indication of success
    public function start(int $options = PTHREADS_INHERIT_ALL)
    {
    }

Usage Example

Beispiel #1
0
 /**
  * @expectedException RuntimeException
  */
 public function testThreadAlreadyJoined()
 {
     $thread = new Thread();
     $this->assertEquals($thread->start(), true);
     $this->assertEquals($thread->join(), true);
     $this->assertEquals($thread->join(), false);
 }
All Usage Examples Of Thread::start