The stupid question is the question not asked | |
PerlMonks |
Re: A server that has a fool as its client: itselfby ikegami (Patriarch) |
on Feb 10, 2011 at 19:22 UTC ( [id://887524]=note: print w/replies, xml ) | Need Help?? |
First, it's necessary to understand the data flow.
So the flow is unidirectional?
To get parallelism, send simply needs to hand off the work to a thread of some sort (including a separate process).
Whether you use Coro, threads, forks or something else seems very incidental. You could also use polling, but select loops tend to be complicated. The first I'd want to do is give the select loop the above enqueue/dequeue interface shown above. Might as well just use Coro to save the work.
In Section
Seekers of Perl Wisdom
|
|