Think about Loose Coupling | |
PerlMonks |
Re: Dormus interruptusby fluxion (Monk) |
on Jun 25, 2004 at 04:47 UTC ( [id://369550]=note: print w/replies, xml ) | Need Help?? |
I'm not sure how well this addresses the cleanliness issue (correction: it doesn't. i thought a detach() would allow a thread to die "cleanly", but that's not the case), but instead of having the threads wait for 'q', you could simply check for 'q' in main, detach() the threads once it's read, then exit the script.
Roses are red, violets are blue. All my base, are belong to you.
In Section
Seekers of Perl Wisdom
|
|