PHP Class PHPDaemon\Thread\Collection

Author: Vasily Zorin ([email protected])
Inheritance: use trait PHPDaemon\Traits\ClassWatchdog, use trait PHPDaemon\Traits\StaticObjectWatchdog
Afficher le fichier Open project: kakserpom/phpdaemon Class Usage Examples

Méthodes publiques

Свойство Type Description
$threads Generic[] Array of threads

Protected Properties

Свойство Type Description
$spawnCounter integer Counter of spawned threads

Méthodes publiques

Méthode Description
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

Method Details

getCount() public méthode

Return the collected threads count
public getCount ( ) : integer
Résultat integer Count

push() public méthode

Pushes certain thread to the collection
public push ( Generic $thread ) : void
$thread Generic
Résultat void

removeTerminated() public méthode

Remove terminated threads from the collection
public removeTerminated ( ) : integer
Résultat integer Rest threads count

signal() public méthode

Send a signal to threads
public signal ( $sig ) : void
Résultat void

start() public méthode

Start all collected threads
public start ( ) : void
Résultat void

stop() public méthode

Stop all collected threads
public stop ( $kill = false ) : void
Résultat void

Property Details

$spawnCounter protected_oe property

Counter of spawned threads
protected int $spawnCounter
Résultat integer

$threads public_oe property

Array of threads
public Generic[],PHPDaemon\Thread $threads
Résultat Generic[]