--- Coro/Coro.pm 2007/01/05 18:25:51 1.107 +++ Coro/Coro.pm 2007/01/12 01:15:03 1.109 @@ -212,7 +212,10 @@ that might have executed other code already (which can be good or bad :). Also, the block is executed in an C context and a warning will be -issued in case of an exception instead of terminating the program, as C does. +issued in case of an exception instead of terminating the program, as +C does. As the coroutine is being reused, stuff like C +will not work in the expected way, unless you call terminate or cancel, +which somehow defeats the purpose of pooling. The priority will be reset to C<0> after each job, otherwise the coroutine will be re-used "as-is". @@ -232,9 +235,8 @@ sub pool_handler { while () { - my ($cb, @arg) = @{ delete $current->{_invoke} }; - eval { + my ($cb, @arg) = @{ delete $current->{_invoke} }; $cb->(@arg); }; warn $@ if $@;