… | |
… | |
46 | callbacks, you I<must never ever> call a Coroutine fucntion that blocks |
46 | callbacks, you I<must never ever> call a Coroutine fucntion that blocks |
47 | the current coroutine. |
47 | the current coroutine. |
48 | |
48 | |
49 | While this seems to work superficially, it will eventually cause memory |
49 | While this seems to work superficially, it will eventually cause memory |
50 | corruption. |
50 | corruption. |
|
|
51 | |
|
|
52 | =head1 SEMANTICS |
|
|
53 | |
|
|
54 | Whenever Event blocks (e.g. in a call to C<one_event>, C<loop< etc.), |
|
|
55 | this module cede's to all other coroutines with the same or higher |
|
|
56 | priority. When any coroutines of lower priority are ready, it will not |
|
|
57 | block but run one of them and then check for events. |
|
|
58 | |
|
|
59 | The effect is that coroutines with the same or higher priority than |
|
|
60 | the blocking coroutine will keep Event from checking for events, while |
|
|
61 | coroutines with lower priority are being run, but Event checks for new |
|
|
62 | events after every cede. |
51 | |
63 | |
52 | =head1 FUNCTIONS |
64 | =head1 FUNCTIONS |
53 | |
65 | |
54 | =over 4 |
66 | =over 4 |
55 | |
67 | |