--- cvsroot/Coro/Coro.pm 2015/10/16 23:41:58 1.338 +++ cvsroot/Coro/Coro.pm 2017/07/14 03:03:56 1.345 @@ -368,7 +368,7 @@ our $main; # main coro our $current; # current coro -our $VERSION = 6.47; +our $VERSION = 6.512; our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub rouse_cb rouse_wait); our %EXPORT_TAGS = ( @@ -500,12 +500,13 @@ which somehow defeats the purpose of pooling (but is fine in the exceptional case). -The priority will be reset to C<0> after each run, tracing will be -disabled, the description will be reset and the default output filehandle -gets restored, so you can change all these. Otherwise the coro will -be re-used "as-is": most notably if you change other per-coro global -stuff such as C<$/> you I revert that change, which is most -simply done by using local as in: C<< local $/ >>. +The priority will be reset to C<0> after each run, all C calls +will be undone, tracing will be disabled, the description will be reset +and the default output filehandle gets restored, so you can change all +these. Otherwise the coro will be re-used "as-is": most notably if you +change other per-coro global stuff such as C<$/> you I revert +that change, which is most simply done by using local as in: C<< local $/ +>>. The idle pool size is limited to C<8> idle coros (this can be adjusted by changing $Coro::POOL_SIZE), but there can be as many non-idle @@ -639,7 +640,7 @@ }; This can be used to localise about any resource (locale, uid, current -working directory etc.) to a block, despite the existance of other +working directory etc.) to a block, despite the existence of other coros. Another interesting example implements time-sliced multitasking using @@ -755,7 +756,7 @@ Returns true iff this Coro object is "new", i.e. has never been run yet. Those states basically consist of only the code reference to call and the arguments, but consumes very little other resources. New states will -automatically get assigned a perl interpreter when they are transfered to. +automatically get assigned a perl interpreter when they are transferred to. =item $state->is_zombie @@ -1124,7 +1125,7 @@ event-based program, or when you use event-based libraries. These typically register a callback for some event, and call that callback -when the event occured. In a coro, however, you typically want to +when the event occurred. In a coro, however, you typically want to just wait for the event, simplyifying things. For example C<< AnyEvent->child >> registers a callback to be called when @@ -1263,7 +1264,7 @@ by the forks module, which gives you the (i-) threads API, just much faster). -Sharing data is in the i-threads model is done by transfering data +Sharing data is in the i-threads model is done by transferring data structures between threads using copying semantics, which is very slow - shared data simply does not exist. Benchmarks using i-threads which are communication-intensive show extremely bad behaviour with i-threads (in