Why not use a Thread::Queue to distribute the work to your worker threads? The workers will block when the queue is empty and get woken up when there is work to be done.
In reply to Re: Boolean Thread::Semaphore ?
by Corion
in thread Boolean Thread::Semaphore ?
by chrestomanci
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |