in reply to Re: Coro, EV and cede
in thread Coro, EV and cede

Sorry to reply on your post, I wish perlmonks had a way to anonymously + reply to postings, but I haven't found it yet. Anyway, Coro::AnyEvent::poll *is* the right function, and it does work + fine on my box. The output is this: first second second second second second second second second second second second second second second second second second second second second 73246 second first second second second second second The problem the original poster likely runs into is his use of CORE::s +elect - this function blocks the process for half a second each time +it's called, so LWP needs long time to make progress, because it can +only do something twice a second.

Replies are listed 'Best First'.
Re^3: Coro, EV and cede
by Nick Kostirya (Sexton) on Dec 27, 2011 at 13:59 UTC
    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.