Just another Perl shrine | |
PerlMonks |
Re^3: Threading with a twistby Random_Walk (Prior) |
on Oct 03, 2017 at 12:44 UTC ( [id://1200610]=note: print w/replies, xml ) | Need Help?? |
Because KISS The design in the OP gives two very disparate jobs to the 'Boss'. It must flip between checking if there are results on the results queue and handling them, then seeing if there is anything to read on <STDIN> and passing it off to workers. The OP is talking about using non blocking calls and sleeps to do this. The complexity clearly recognised by the multiplicity of punctuation marks ... Monitor $RXQUEUE and <STDIN> - simultaneously??? If we split these two functions then we have two simple tasks.
Cheers,
Pereant, qui ante nos nostra dixerunt!
In Section
Seekers of Perl Wisdom
|
|