Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Boolean Thread::Semaphore ?

by chrestomanci (Priest)
on Feb 08, 2012 at 12:12 UTC ( #952472=note: print w/replies, xml ) Need Help??


in reply to Re: Boolean Thread::Semaphore ?
in thread Boolean Thread::Semaphore ?

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://952472]
help
Chatterbox?
[Lady_Aleena]: Are you all sick of me discussing my reorganization?
[Discipulus]: Untillian Headache or about the semantic of until
[Discipulus]: Lady_Aleena use Great::Flood really, start some little project with new eyes (and a DB)
[Discipulus]: 'unless it rains' => 'a meno che NON piova'

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2017-05-27 20:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?