pht\Thread::taskCount

(PECL pht >= 0.0.1)

pht\Thread::taskCountGets a thread's task count

Opis

public pht\Thread::taskCount ( void ) : int

Retrieves the current task count of a pht\Thread.

Parametry

Ta funkcja nie posiada parametrów.

Zwracane wartości

The number of tasks remaining to be processed.

Przykłady

Przykład #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());

Powyższy przykład wyświetli:

int(3)

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top