PHP Класс PHPDaemon\Thread\Collection

Автор: Vasily Zorin ([email protected])
Наследование: use trait PHPDaemon\Traits\ClassWatchdog, use trait PHPDaemon\Traits\StaticObjectWatchdog
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$threads Generic[] Array of threads

Защищенные свойства (Protected)

Свойство Тип Описание
$spawnCounter integer Counter of spawned threads

Открытые методы

Метод Описание
getCount ( ) : integer Return the collected threads count
push ( Generic $thread ) : void Pushes certain thread to the collection
removeTerminated ( ) : integer Remove terminated threads from the collection
signal ( $sig ) : void Send a signal to threads
start ( ) : void Start all collected threads
stop ( $kill = false ) : void Stop all collected threads

Описание методов

getCount() публичный Метод

Return the collected threads count
public getCount ( ) : integer
Результат integer Count

push() публичный Метод

Pushes certain thread to the collection
public push ( Generic $thread ) : void
$thread Generic
Результат void

removeTerminated() публичный Метод

Remove terminated threads from the collection
public removeTerminated ( ) : integer
Результат integer Rest threads count

signal() публичный Метод

Send a signal to threads
public signal ( $sig ) : void
Результат void

start() публичный Метод

Start all collected threads
public start ( ) : void
Результат void

stop() публичный Метод

Stop all collected threads
public stop ( $kill = false ) : void
Результат void

Описание свойств

$spawnCounter защищенное свойство

Counter of spawned threads
protected int $spawnCounter
Результат integer

$threads публичное свойство

Array of threads
public Generic[],PHPDaemon\Thread $threads
Результат Generic[]