Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 22595 программистов и 1216 роботов. Сейчас ищут 718 программистов ...
Приступая к работе

The Pool class

Вернуться к: 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 {
/* Свойства */
protected $size ;
protected $class ;
protected $workers ;
protected $work ;
protected $ctor ;
protected $last ;
/* Методы */
public void collect ( Callable $collector )
public Pool __construct ( integer $size , string $class [, array $ctor ] )
public void resize ( integer $size )
public void shutdown ( void )
public integer submit ( Threaded $task )
public integer submitTo ( integer $worker , Threaded $task )
}

Свойства

size

maximum number of Workers this Pool can use

class

the class of the Worker

ctor

the arguments for constructor of new Workers

workers

references to Workers

work

references to Threaded objects submitted to the Pool

last

offset in workers of the last Worker used

Содержание



Вернуться к: pthreads

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware