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

Comparing Coro/README (file contents):
Revision 1.35 by root, Wed Feb 11 19:30:34 2015 UTC vs.
Revision 1.38 by root, Wed Jun 22 20:24:38 2016 UTC

417 program, as "async" does. As the coro is being reused, stuff like 417 program, as "async" does. As the coro is being reused, stuff like
418 "on_destroy" will not work in the expected way, unless you call 418 "on_destroy" will not work in the expected way, unless you call
419 terminate or cancel, which somehow defeats the purpose of pooling 419 terminate or cancel, which somehow defeats the purpose of pooling
420 (but is fine in the exceptional case). 420 (but is fine in the exceptional case).
421 421
422 The priority will be reset to 0 after each run, tracing will be 422 The priority will be reset to 0 after each run, all "swap_sv" calls
423 disabled, the description will be reset and the default output 423 will be undone, tracing will be disabled, the description will be
424 filehandle gets restored, so you can change all these. Otherwise the 424 reset and the default output filehandle gets restored, so you can
425 coro will be re-used "as-is": most notably if you change other 425 change all these. Otherwise the coro will be re-used "as-is": most
426 per-coro global stuff such as $/ you *must needs* revert that 426 notably if you change other per-coro global stuff such as $/ you
427 change, which is most simply done by using local as in: "local $/". 427 *must needs* revert that change, which is most simply done by using
428 local as in: "local $/".
428 429
429 The idle pool size is limited to 8 idle coros (this can be adjusted 430 The idle pool size is limited to 8 idle coros (this can be adjusted
430 by changing $Coro::POOL_SIZE), but there can be as many non-idle 431 by changing $Coro::POOL_SIZE), but there can be as many non-idle
431 coros as required. 432 coros as required.
432 433
857 otherwise you might suffer from crashes or worse. The only event 858 otherwise you might suffer from crashes or worse. The only event
858 library currently known that is safe to use without "unblock_sub" is 859 library currently known that is safe to use without "unblock_sub" is
859 EV (but you might still run into deadlocks if all event loops are 860 EV (but you might still run into deadlocks if all event loops are
860 blocked). 861 blocked).
861 862
862 Coro will try to catch you when you block in the event loop 863 Coro will try to catch you when you block in the event loop ("FATAL:
863 ("FATAL:$Coro::idle blocked itself"), but this is just best effort 864 $Coro::idle blocked itself"), but this is just best effort and only
864 and only works when you do not run your own event loop. 865 works when you do not run your own event loop.
865 866
866 This function allows your callbacks to block by executing them in 867 This function allows your callbacks to block by executing them in
867 another coro where it is safe to block. One example where blocking 868 another coro where it is safe to block. One example where blocking
868 is handy is when you use the Coro::AIO functions to save results to 869 is handy is when you use the Coro::AIO functions to save results to
869 disk, for example. 870 disk, for example.
1074 1075
1075 XS API: Coro::MakeMaker. 1076 XS API: Coro::MakeMaker.
1076 1077
1077 Low level Configuration, Thread Environment, Continuations: Coro::State. 1078 Low level Configuration, Thread Environment, Continuations: Coro::State.
1078 1079
1079AUTHOR 1080AUTHOR/SUPPORT/CONTACT
1080 Marc Lehmann <schmorp@schmorp.de> 1081 Marc A. Lehmann <schmorp@schmorp.de>
1081 http://home.schmorp.de/ 1082 http://software.schmorp.de/pkg/Coro.html
1082 1083

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines