Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
It seems You are mixing old-style and deprecated threads model(Thread module) with the new ithreads thread model (threads module). Creating the threads should be done like this:
Please also note that indirect object notation like new Class is discouraged in Modern Perl in favor of Class->new. If You do care about worker threads finishing their jobs You should use join() instead of detach() so You don't need the second while loop. Please see the perlthrtut for a more thorough explanation. Please give the Perl version and OS You are running this, so the monks here can suggest better alternatives to Your current code. You can also find valuable information regarding threads programming in Perl from fellow monks BrowserUk, ikegami, zentara. Looking forward to Your reply! In reply to Re: Perl Threads Boss/Worker Example
by arpad.szasz
|
|