The stupid question is the question not asked | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Is there a way of using Thread::Semaphore in this way, or an alternative semaphore module that can be used for this purpose? You don't want a semaphore. The simplest mechanism is:
If you are concerned that the queue might empty during that 1 second, use Time::HiRes::usleep(). If you really insist on not polling the queuesize, then use a condition vatiable:
But really, the latter involves more work and is less effective. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In reply to Re: Boolean Thread::Semaphore ?
by BrowserUk
|
|