ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Coro.pm
(Generate patch)

Comparing Coro/Coro.pm (file contents):
Revision 1.227 by root, Thu Nov 20 03:10:30 2008 UTC vs.
Revision 1.228 by root, Thu Nov 20 03:14:49 2008 UTC

212Similar to C<async>, but uses a coroutine pool, so you should not call 212Similar to C<async>, but uses a coroutine pool, so you should not call
213terminate or join on it (although you are allowed to), and you get a 213terminate or join on it (although you are allowed to), and you get a
214coroutine that might have executed other code already (which can be good 214coroutine that might have executed other code already (which can be good
215or bad :). 215or bad :).
216 216
217On the plus side, this function is faster than creating (and destroying) 217On the plus side, this function is about twice as fast as creating (and
218a completly new coroutine, so if you need a lot of generic coroutines in 218destroying) a completely new coroutine, so if you need a lot of generic
219quick successsion, use C<async_pool>, not C<async>. 219coroutines in quick successsion, use C<async_pool>, not C<async>.
220 220
221The code block is executed in an C<eval> context and a warning will be 221The code block is executed in an C<eval> context and a warning will be
222issued in case of an exception instead of terminating the program, as 222issued in case of an exception instead of terminating the program, as
223C<async> does. As the coroutine is being reused, stuff like C<on_destroy> 223C<async> does. As the coroutine is being reused, stuff like C<on_destroy>
224will not work in the expected way, unless you call terminate or cancel, 224will not work in the expected way, unless you call terminate or cancel,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines