… | |
… | |
3281 | |
3281 | |
3282 | Choosing a model is hard - look around, learn, know that usually you can do |
3282 | Choosing a model is hard - look around, learn, know that usually you can do |
3283 | better than you currently do :-) |
3283 | better 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 |
|
|
3286 | event loop. |
|
|
3287 | |
3286 | event loop - C<ev_async> watchers can be used to wake them up from other |
3288 | C<ev_async> watchers can be used to wake them up from other threads safely |
3287 | threads 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 |
3291 | An example use would be to communicate signals or other events that only |
3290 | C<ev_async> watchers to tell your other loops about any such events. |
3292 | work in the default loop by registering the signal watcher with the |
|
|
3293 | default loop and triggering an C<ev_async> watcher from the default loop |
|
|
3294 | watcher 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 | |