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?? |
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
In Section
Meditations
|
|