Php/docs/class.threaded
(PECL pthreads >= 2.0.0)
Introduction
Threaded objects form the basis of pthreads ability to execute user code in parallel; they expose synchronization methods and various useful interfaces.
Threaded objects, most importantly, provide implicit safety for the programmer; all operations on the object scope are safe.
Class synopsis
Threaded implements Collectable , Traversable , Countable , ArrayAccess {
public chunk
( int $size
, bool $preserve
) : array
public count ( ) : int
public extend
( string $class
) : bool
public getTerminationInfo ( ) : array
public isRunning ( ) : bool
public isTerminated ( ) : bool
public isWaiting ( ) : bool
public lock ( ) : bool
public notify ( ) : bool
public notifyOne ( ) : bool
public pop ( ) : bool
public run ( ) : void
public synchronized
( Closure $block
, mixed ...$args
) : mixed
public unlock ( ) : bool
public wait
([ int $timeout
] ) : bool
}
Table of Contents
- Threaded::chunk — Manipulation
- Threaded::count — Manipulation
- Threaded::extend — Runtime Manipulation
- Threaded::from — Creation
- Threaded::getTerminationInfo — Error Detection
- Threaded::isRunning — State Detection
- Threaded::isTerminated — State Detection
- Threaded::isWaiting — State Detection
- Threaded::lock — Synchronization
- Threaded::merge — Manipulation
- Threaded::notify — Synchronization
- Threaded::notifyOne — Synchronization
- Threaded::pop — Manipulation
- Threaded::run — Execution
- Threaded::shift — Manipulation
- Threaded::synchronized — Synchronization
- Threaded::unlock — Synchronization
- Threaded::wait — Synchronization
/* Methods */