Appropiate Coro/AnyEvent model?
Mark Lawrence
nomad at null.net
Tue Nov 19 11:29:54 CET 2013
Ok, a light just went off inside my head. From this:
On Mon Nov 18, 2013 at 02:13:32AM +0100, Marc Lehmann wrote:
>
> Coro::Handle isn't event based, it's supposed to emulate perl's
> IO::Handle, to allow traditional code to (mostly) run unchanged.
and this:
On Mon Nov 18, 2013 at 11:35:54AM +1000, Andrew Whatson wrote:
>
> This callback does not run inside any of your threads. It runs inside a
> special event-handling thread. By calling terminate or
> $Coro::current->cancel, you're blowing up an internal thread for
> whichever event loop you're using, which is not what you want.
I realize now that I was imagining a different relationship between
Coro and AnyEvent to what actually is the case, and I was also mixing
up objects with threads.
Thanks for the help.
--
Mark Lawrence
More information about the anyevent
mailing list