Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
some kinda synchronized processing Er...threads have enough problems with non-deterministic behavior, you might want to refine that "requirement" a bit ? And I spotted a rather gruesome wart in the midst of your example: invoking system("date")from inside a thread is not exactly best practice (you do realize system() turns into a fork()?). Consider using instead. Of course, making that edit changes the whole behavior of the threads: since its much faster, many threads will complete before other threads have even been started...so its not exactly simultaneous. As BrowserUk mentioned, look into lock() and cond_wait(). Perl Contrarian & SQL fanboy In reply to Re: multi threading
by renodino
|
|