Worker::getStacked PHP Method

getStacked() public method

Returns the number of threaded tasks waiting to be executed by the referenced Worker
public getStacked ( ) : integer
return integer An integral value
    public function getStacked()
    {
    }

Usage Example

コード例 #1
0
 public function testGetStacked()
 {
     $worker = new Worker();
     $work = new WorkerTestWork();
     $worker->stack($work);
     $this->assertEquals(1, $worker->getStacked());
     $worker->stack($work);
     $this->assertEquals(2, $worker->getStacked());
 }