in reply to Re^2: Threading with a twist
in thread Threading with a twist
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.
- Listen on <STDIN> and put work on worker queue.
- Listen on results queue and publish results
Cheers,
R.
Pereant, qui ante nos nostra dixerunt!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Threading with a twist
by Anonymous Monk on Oct 03, 2017 at 16:48 UTC | |
by Random_Walk (Prior) on Oct 04, 2017 at 07:23 UTC |
In Section
Seekers of Perl Wisdom