Рекурсивный акроним словосочетания «PHP: Hypertext Preprocessor»
Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 18392 программиста и 1688 роботов. Сейчас ищут 1017 программистов ...
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.
Обзор классов
Свойства
- 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
Содержание
- Pool::collect — Collect references to completed tasks
- Pool::__construct — Creates a new Pool of Workers
- Pool::resize — Resize the Pool
- Pool::shutdown — Shutdown all Workers
- Pool::submit — Submits an object for execution
- Pool::submitTo — Submits an object for execution
Вернуться к: pthreads