(PECL pht >= 0.0.1)
pht\Thread::taskCount — Gets a thread's task count
Retrieves the current task count of a pht\Thread.
Esta función no tiene parámetros.
The number of tasks remaining to be processed.
Ejemplo #1 Getting the task count of a thread
<?php
use pht\Thread;
$thread = new Thread();
$thread->addFunctionTask(function (){});
$thread->addFunctionTask(function (){});
$thread->addFunctionTask(function (){});
var_dump($thread->taskCount());
El resultado del ejemplo sería:
int(3)