… | |
… | |
76 | |
76 | |
77 | =cut |
77 | =cut |
78 | |
78 | |
79 | package EV; |
79 | package EV; |
80 | |
80 | |
81 | no warnings; |
81 | use common::sense; |
82 | use strict; |
|
|
83 | |
82 | |
84 | BEGIN { |
83 | BEGIN { |
85 | our $VERSION = '3.6'; |
84 | our $VERSION = '3.7'; |
86 | use XSLoader; |
85 | use XSLoader; |
87 | XSLoader::load "EV", $VERSION; |
86 | XSLoader::load "EV", $VERSION; |
88 | } |
87 | } |
89 | |
88 | |
90 | @EV::IO::ISA = |
89 | @EV::IO::ISA = |
… | |
… | |
332 | These advanced functions set the minimum block interval when polling for I/O events and the minimum |
331 | These advanced functions set the minimum block interval when polling for I/O events and the minimum |
333 | wait interval for timer events. See the libev documentation at |
332 | wait interval for timer events. See the libev documentation at |
334 | L<http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#FUNCTIONS_CONTROLLING_THE_EVENT_LOOP> |
333 | L<http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#FUNCTIONS_CONTROLLING_THE_EVENT_LOOP> |
335 | (locally installed as F<EV::libev>) for a more detailed discussion. |
334 | (locally installed as F<EV::libev>) for a more detailed discussion. |
336 | |
335 | |
|
|
336 | =item $count = EV::pending_count |
|
|
337 | |
|
|
338 | =item $count = $loop->pending_count |
|
|
339 | |
|
|
340 | Returns the number of currently pending watchers. |
|
|
341 | |
|
|
342 | =item EV::invoke_pending |
|
|
343 | |
|
|
344 | =item $loop->invoke_pending |
|
|
345 | |
|
|
346 | Invoke all currently pending watchers. |
|
|
347 | |
337 | =back |
348 | =back |
338 | |
349 | |
339 | |
350 | |
340 | =head1 WATCHER OBJECTS |
351 | =head1 WATCHER OBJECTS |
341 | |
352 | |
… | |
… | |
1044 | |
1055 | |
1045 | =back |
1056 | =back |
1046 | |
1057 | |
1047 | =head3 ASYNC WATCHERS - how to wake up another event loop |
1058 | =head3 ASYNC WATCHERS - how to wake up another event loop |
1048 | |
1059 | |
1049 | Async watchers are provided by EV, but have little use in perl directly, as perl |
1060 | Async watchers are provided by EV, but have little use in perl directly, |
1050 | neither supports threads nor direct access to signal handlers or other |
1061 | as perl neither supports threads running in parallel nor direct access to |
1051 | contexts where they could be of value. |
1062 | signal handlers or other contexts where they could be of value. |
1052 | |
1063 | |
1053 | It is, however, possible to use them from the XS level. |
1064 | It is, however, possible to use them from the XS level. |
1054 | |
1065 | |
1055 | Please see the libev documentation for further details. |
1066 | Please see the libev documentation for further details. |
1056 | |
1067 | |
… | |
… | |
1084 | my $async_check = EV::check sub { }; |
1095 | my $async_check = EV::check sub { }; |
1085 | |
1096 | |
1086 | This ensures that perl gets into control for a short time to handle any |
1097 | This ensures that perl gets into control for a short time to handle any |
1087 | pending signals, and also ensures (slightly) slower overall operation. |
1098 | pending signals, and also ensures (slightly) slower overall operation. |
1088 | |
1099 | |
1089 | =head1 THREADS |
1100 | =head1 ITHREADS |
1090 | |
1101 | |
1091 | Threads are not supported by this module in any way. Perl pseudo-threads |
1102 | Ithreads are not supported by this module in any way. Perl pseudo-threads |
1092 | is evil stuff and must die. As soon as Perl gains real threads I will work |
1103 | is evil stuff and must die. Real threads as provided by Coro are fully |
1093 | on thread support for it. |
1104 | supported (and enhanced support is available via L<Coro::EV>). |
1094 | |
1105 | |
1095 | =head1 FORK |
1106 | =head1 FORK |
1096 | |
1107 | |
1097 | Most of the "improved" event delivering mechanisms of modern operating |
1108 | Most of the "improved" event delivering mechanisms of modern operating |
1098 | systems have quite a few problems with fork(2) (to put it bluntly: it is |
1109 | systems have quite a few problems with fork(2) (to put it bluntly: it is |