pthreads
PHP Manual

Threaded 类

(PECL pthreads >= 2.0.0)

简介

Threaded 对象提供支持 pthreads 操作的基本功能,包括同步方法以及其他对程序员很有帮助的接口。

重要的是,Threaded 提供了隐式的线程安全机制,这个对象中的所有操作都是线程安全的。

类摘要

Threaded implements Collectable , Traversable , Countable , ArrayAccess {
/* 方法 */
public array chunk ( int $size , bool $preserve )
public int count ( void )
public bool extend ( string $class )
public Threaded from ( Closure $run [, Closure $construct [, array $args ]] )
public array getTerminationInfo ( void )
public bool isRunning ( void )
public bool isTerminated ( void )
public bool isWaiting ( void )
public bool lock ( void )
public bool merge ( mixed $from [, bool $overwrite ] )
public bool notify ( void )
public bool notifyOne ( void )
public bool pop ( void )
public void run ( void )
public boolean shift ( void )
public mixed synchronized ( Closure $block [, mixed $... ] )
public bool unlock ( void )
public bool wait ([ int $timeout ] )
}

Table of Contents


pthreads
PHP Manual