EV::Async#

📦 max

An async watcher, as EV::async makes: anything may trigger it with send, and its callback then runs in its loop - the way compiled code or another loop wakes a loop that is waiting. Several sends before the callback runs give one callback. The methods all watchers share are EV::Watcher’s.

Synopsis#

my $wake = EV::async sub { print "woken\n"; EV::break };
my $t    = EV::timer 1, 0, sub { $wake->send };
EV::run;

Functions#

Waking#

send#

Trigger the watcher: its callback runs in the loop’s next round.

async_pending#

True when send was called and the callback has not run yet.