Marc A. Lehmann
/
Coro-0.06
/
Coro::Signal
NAME
Coro::Signal - coroutine signals (binary semaphores)
SYNOPSIS
use Coro::Signal;
$sig = new Coro::Signal;
$sig->wait; # wait for signal
# ... some other "thread"
$sig->send;
DESCRIPTION
- $s = new Coro::Signal;
-
Create a new signal.
- $s->wait
-
Wait for the signal to occur. Returns immediately if the signal has been sent before.
- $s->send
-
Send the signal, waking up a waiting process or remembering the signal.
- $s->broadcast
-
Send the signal, waking up all waiting process. If no process is waiting the signal is lost.
- $s->awaited
-
Return true when the signal is beign awaited by some process.
AUTHOR
Marc Lehmann <pcg@goof.com>
http://www.goof.com/pcg/marc/