I am doing that, the work finding thread is putting the work it finds into a Thread::Queue object.
The reason I want to use a semaphore as well is because the work finder runs much faster than the workers, but is quite expensive in terms of resource consumption.
If there was not a mechanism to pause the work finder when there is enough work in the queue, it would build a queue of millions of items and waste a lot of memory and other resources in the process.
In reply to Re^2: Boolean Thread::Semaphore ?
by chrestomanci
in thread Boolean Thread::Semaphore ?
by chrestomanci
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |