Please wait while we load your page...

Tools

PHP Manual [The Pool class]

Protect Your Website Today


PHP Manual || pthreads

(PECL pthreads >= 2.0.0)

A Pool is a container for, and controller of, an adjustable number of Workers.

Pooling provides a higher level abstraction of the Worker functionality, including the management of references in the way required by pthreads.

Pool {
/* Properties */
protected size ;
protected class ;
protected workers ;
protected ctor ;
protected last ;
/* Methods */
public collect ([ Callable $collector ] ) : int
public __construct ( int $size [, string $class [, array $ctor ]] ) : Pool
public resize ( int $size ) : void
public shutdown ( void ) : void
public submit ( Threaded $task ) : int
public submitTo ( int $worker , Threaded $task ) : int
}
size

maximum number of Workers this Pool can use

class

the class of the Worker

workers

references to Workers

ctor

the arguments for constructor of new Workers

last

offset in workers of the last Worker used



PHP Manual || pthreads