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:
async { while (1) { ... cede; } };
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:
async { while (1) { ... sleep 0; cede; } };
Coro::Timer::sleep - it's an explicit call to EV.
Has anyone faced such an issue?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Coro, EV and cede
by ikegami (Patriarch) on Apr 07, 2011 at 15:58 UTC | |
by Nick Kostirya (Sexton) on Apr 08, 2011 at 06:09 UTC | |
by ikegami (Patriarch) on Apr 08, 2011 at 17:02 UTC | |
by ikegami (Patriarch) on Apr 08, 2011 at 15:40 UTC | |
|
Re: Coro, EV and cede
by zwon (Abbot) on Apr 07, 2011 at 10:53 UTC | |
by Nick Kostirya (Sexton) on Apr 07, 2011 at 12:01 UTC | |
by Corion (Patriarch) on Apr 07, 2011 at 12:12 UTC | |
by Nick Kostirya (Sexton) on Apr 07, 2011 at 12:36 UTC | |
by zwon (Abbot) on Apr 07, 2011 at 13:00 UTC | |
by Nick Kostirya (Sexton) on Apr 07, 2011 at 13:22 UTC | |
by zwon (Abbot) on Apr 07, 2011 at 14:20 UTC | |
by Anonymous Monk on Dec 23, 2011 at 00:00 UTC | |
by Nick Kostirya (Sexton) on Dec 27, 2011 at 13:59 UTC | |
|
Re: Coro, EV and cede
by Anonymous Monk on Jun 24, 2011 at 19:44 UTC | |
by Nick Kostirya (Sexton) on Nov 15, 2011 at 12:54 UTC | |
by Nick Kostirya (Sexton) on Dec 27, 2011 at 13:52 UTC |