Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: threads: spawn early to avoid the crush.

by zentara (Archbishop)
on Mar 02, 2006 at 20:15 UTC ( [id://534036]=note: print w/replies, xml ) Need Help??


in reply to Re^2: threads: spawn early to avoid the crush.
in thread threads: spawn early to avoid the crush.

Isn't it amazing how far we've come so far? I'm sure you've examined the latest threads-related nodes where it is discussed that the new separate threads:shared module now has the ability to bless shared refs. I'm thinking that object could be the basis of the thread object. You create a shared hash, then bless it into an object, then use that object as the basis of the thread object. Add to the blessed object the sleeping worker thread(automatically), which shares that shared hash ref, then make up the methods, etc, to pass code to be evaled, go to sleep, wake up, die, join, etc.

I'm not much into making objects, but that would be my first attempt.

You know more about it than me, I'm pretty content to stick with functional worker threads which I control thru a hash.


I'm not really a human, but I play one on earth. flash japh
  • Comment on Re^3: threads: spawn early to avoid the crush.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://534036]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-04-19 19:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found