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