ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.pod
(Generate patch)

Comparing libev/ev.pod (file contents):
Revision 1.180 by root, Fri Sep 19 03:45:55 2008 UTC vs.
Revision 1.182 by root, Fri Sep 19 03:52:56 2008 UTC

3281 3281
3282Choosing a model is hard - look around, learn, know that usually you can do 3282Choosing a model is hard - look around, learn, know that usually you can do
3283better than you currently do :-) 3283better than you currently do :-)
3284 3284
3285=item * often you need to talk to some other thread which blocks in the 3285=item * often you need to talk to some other thread which blocks in the
3286event loop.
3287
3286event loop - C<ev_async> watchers can be used to wake them up from other 3288C<ev_async> watchers can be used to wake them up from other threads safely
3287threads safely (or from signal contexts...). 3289(or from signal contexts...).
3288 3290
3289=item * some watcher types are only supported in the default loop - use 3291An example use would be to communicate signals or other events that only
3290C<ev_async> watchers to tell your other loops about any such events. 3292work in the default loop by registering the signal watcher with the
3293default loop and triggering an C<ev_async> watcher from the default loop
3294watcher callback into the event loop interested in the signal.
3291 3295
3292=back 3296=back
3293 3297
3294=head2 COROUTINES 3298=head2 COROUTINES
3295 3299
3298coroutines (e.g. you can call C<ev_loop> on the same loop from two 3302coroutines (e.g. you can call C<ev_loop> on the same loop from two
3299different coroutines and switch freely between both coroutines running the 3303different coroutines and switch freely between both coroutines running the
3300loop, as long as you don't confuse yourself). The only exception is that 3304loop, as long as you don't confuse yourself). The only exception is that
3301you must not do this from C<ev_periodic> reschedule callbacks. 3305you must not do this from C<ev_periodic> reschedule callbacks.
3302 3306
3303Care has been invested into making sure that libev does not keep local 3307Care has been taken to ensure that libev does not keep local state inside
3304state inside C<ev_loop>, and other calls do not usually allow coroutine 3308C<ev_loop>, and other calls do not usually allow coroutine switches.
3305switches.
3306 3309
3307 3310
3308=head1 COMPLEXITIES 3311=head1 COMPLEXITIES
3309 3312
3310In this section the complexities of (many of) the algorithms used inside 3313In this section the complexities of (many of) the algorithms used inside

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines