pht
PHP Manual

The Thread class

(PECL pht >= 0.0.1)

简介

The pht\Thread class abstracts away a native thread. It has an internal task queue, where the methods pht\Thread::addClassTask(), pht\Thread::addFunctionTask(), and pht\Thread::addFileTask() push new tasks onto this queue. Invoking the pht\Thread::start() method will cause the new thread to be spawned, where it will then begin working through the task queue. A thread may be reused for any number of tasks.

类摘要

pht\Thread {
/* 方法 */
public void addClassTask ( string $className [, mixed $...ctorArgs ] )
public void addFileTask ( string $fileName [, mixed $...globals ] )
public void addFunctionTask ( callable $func [, mixed $...funcArgs ] )
public void join ( void )
public void start ( void )
public int taskCount ( void )
}

Table of Contents


pht
PHP Manual