PHP Класс Spork\SharedMemory

Показать файл Открыть проект

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

Метод Описание
__construct ( integer $pid = null, integer $signal = null ) Constructor.
receive ( ) : array Reads all messages from shared memory.
send ( mixed $message, integer $signal = null, integer $pause = 500 ) Writes a message to the shared memory.
signal ( $signal ) Sends a signal to the other process.

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

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

Constructor.
public __construct ( integer $pid = null, integer $signal = null )
$pid integer The child process id or null if this is the child
$signal integer The signal to send after writing to shared memory

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

Reads all messages from shared memory.
public receive ( ) : array
Результат array An array of messages

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

Writes a message to the shared memory.
public send ( mixed $message, integer $signal = null, integer $pause = 500 )
$message mixed The message to send
$signal integer The signal to send afterward
$pause integer The number of microseconds to pause after signalling

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

Sends a signal to the other process.
public signal ( $signal )