"be consistent" | |
PerlMonks |
Coro, EV and cedeby Nick Kostirya (Sexton) |
on Apr 07, 2011 at 08:18 UTC ( [id://897972]=perlquestion: print w/replies, xml ) | Need Help?? |
Nick Kostirya has asked for the wisdom of the Perl Monks concerning the following question: I'd like to try the Coro together with EV. There are a few code snippets:
When I use only Coro, everything's fine. But when I try to connect EV, weird things happen, which can be explained only by the fact cede doesn't pass the control to EV. It forces me to use cede and Coro::Timer::sleep together:
Coro::Timer::sleep - it's an explicit call to EV. Has anyone faced such an issue? UPDATE: I was wrong, Coro::AnyEvent::poll really helps. This is the same as sleep(0). I was pulling his leg, Coro’s author, shame on me. I just could not figure it out that Coro can be used without IO in practice And those using IO have Coro::AnyEvent::poll. Still, I learnt that Marc Lehmann is a patient and very polite person. I got a good lesson too: don’t make the output on STDIN artificially.
Back to
Seekers of Perl Wisdom
|
|