IO::AsyncX::EventFD - simple eventfd notifications
#!/usr/bin/env perl use strict; use warnings; use IO::Async::Loop; use IO::AsyncX::EventFD; my $loop = IO::Async::Loop->new; $loop->add(my $eventfd = IO::AsyncX::EventFD->new(notify => sub { warn "Had event\n" })); $loop->loop_once(0.001); warn "Notifying...\n"; $eventfd->notify; $loop->loop_once(0.001);
Provides a very thin layer over Linux::FD::Event.
Sends a notification to the event FD. This consists of a call to "add" in Linux::FD::Event with the value 1.
Returns the Linux::FD::Event handle.
Configuration. Currently supports the following named parameters:
notify - the callback which will be triggered when there's a new semaphore value
Called when we are added to the loop.
Called when there's a read event.
Returns the underlying IO::Async::Handle instance.
Database::Async::SQLite - uses eventfd as a notification mechanism from the sqlite thread
Tom Molesworth <TEAM@cpan.org>
Copyright Tom Molesworth 2015-2016. Licensed under the same terms as Perl itself.
To install IO::AsyncX::EventFD, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IO::AsyncX::EventFD
CPAN shell
perl -MCPAN -e shell install IO::AsyncX::EventFD
For more information on module installation, please visit the detailed CPAN module installation guide.