--- cvsroot/Coro/Coro.pm 2009/06/17 21:36:35 1.255 +++ cvsroot/Coro/Coro.pm 2009/08/13 02:35:41 1.264 @@ -82,7 +82,7 @@ our $main; # main coro our $current; # current coro -our $VERSION = 5.132; +our $VERSION = 5.162; our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub); our %EXPORT_TAGS = ( @@ -209,14 +209,6 @@ print "@_\n"; } 1,2,3,4; -=cut - -sub async(&@) { - my $coro = new Coro @_; - $coro->ready; - $coro -} - =item async_pool { ... } [@args...] Similar to C, but uses a coro pool, so you should not call @@ -400,7 +392,7 @@ # use like this: timeslice { # The following is an endless loop that would normally - # monopolise the process. Sicne it runs in a timeslice + # monopolise the process. Since it runs in a timesliced # environment, it will regularly cede to other threads. while () { } }; @@ -753,7 +745,9 @@ As soon as the callback is invoked (or when the callback was invoked before C), it will return the arguments originally passed to -the rouse callback. +the rouse callback. In scalar context, that means you get the I +argument, just as if C had a C +statement at the end. See the section B for an actual usage example.