… | |
… | |
1168 | [Prima:: => AnyEvent::Impl::POE::], |
1168 | [Prima:: => AnyEvent::Impl::POE::], |
1169 | # IO::Async is just too broken - we would need workarounds for its |
1169 | # IO::Async is just too broken - we would need workarounds for its |
1170 | # byzantine signal and broken child handling, among others. |
1170 | # byzantine signal and broken child handling, among others. |
1171 | # IO::Async is rather hard to detect, as it doesn't have any |
1171 | # IO::Async is rather hard to detect, as it doesn't have any |
1172 | # obvious default class. |
1172 | # obvious default class. |
1173 | # [0, IO::Async:: => AnyEvent::Impl::IOAsync::], # requires special main program |
1173 | [IO::Async:: => AnyEvent::Impl::IOAsync::], # requires special main program |
1174 | # [0, IO::Async::Loop:: => AnyEvent::Impl::IOAsync::], # requires special main program |
1174 | [IO::Async::Loop:: => AnyEvent::Impl::IOAsync::], # requires special main program |
1175 | # [0, IO::Async::Notifier:: => AnyEvent::Impl::IOAsync::], # requires special main program |
1175 | [IO::Async::Notifier:: => AnyEvent::Impl::IOAsync::], # requires special main program |
|
|
1176 | [AnyEvent::Impl::IOAsync:: => AnyEvent::Impl::IOAsync::], # requires special main program |
1176 | ); |
1177 | ); |
1177 | |
1178 | |
1178 | our %method = map +($_ => 1), |
1179 | our %method = map +($_ => 1), |
1179 | qw(io timer time now now_update signal child idle condvar one_event DESTROY); |
1180 | qw(io timer time now now_update signal child idle condvar one_event DESTROY); |
1180 | |
1181 | |
… | |
… | |
1300 | sub io($$$) { |
1301 | sub io($$$) { |
1301 | AnyEvent->io (fh => $_[0], poll => $_[1] ? "w" : "r", cb => $_[2]) |
1302 | AnyEvent->io (fh => $_[0], poll => $_[1] ? "w" : "r", cb => $_[2]) |
1302 | } |
1303 | } |
1303 | |
1304 | |
1304 | sub timer($$$) { |
1305 | sub timer($$$) { |
1305 | AnyEvent->timer (after => $_[0], interval => $_[1], cb => $_[2]); |
1306 | AnyEvent->timer (after => $_[0], interval => $_[1], cb => $_[2]) |
1306 | } |
1307 | } |
1307 | |
1308 | |
1308 | sub signal($$) { |
1309 | sub signal($$) { |
1309 | AnyEvent->signal (signal => $_[0], cb => $_[1]); |
1310 | AnyEvent->signal (signal => $_[0], cb => $_[1]) |
1310 | } |
1311 | } |
1311 | |
1312 | |
1312 | sub child($$) { |
1313 | sub child($$) { |
1313 | AnyEvent->child (pid => $_[0], cb => $_[1]); |
1314 | AnyEvent->child (pid => $_[0], cb => $_[1]) |
1314 | } |
1315 | } |
1315 | |
1316 | |
1316 | sub idle($) { |
1317 | sub idle($) { |
1317 | AnyEvent->idle (cb => $_[0]); |
1318 | AnyEvent->idle (cb => $_[0]) |
1318 | } |
1319 | } |
1319 | |
1320 | |
1320 | sub cv(;&) { |
1321 | sub cv(;&) { |
1321 | AnyEvent->condvar (@_ ? (cb => $_[0]) : ()) |
1322 | AnyEvent->condvar (@_ ? (cb => $_[0]) : ()) |
1322 | } |
1323 | } |