Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

io::async::loop::glib(3pm) [debian man page]

IO::Async::Loop::Glib(3pm)				User Contributed Perl Documentation				IO::Async::Loop::Glib(3pm)

NAME
"IO::Async::Loop::Glib" - use "IO::Async" with Glib or GTK SYNOPSIS
use IO::Async::Loop::Glib; my $loop = IO::Async::Loop::Glib->new(); $loop->add( ... ); ... # Rest of GLib/Gtk program that uses GLib Glib::MainLoop->new->run(); Or $loop->loop_forever(); Or while(1) { $loop->loop_once(); } DESCRIPTION
This subclass of "IO::Async::Loop" uses the "Glib::MainLoop" to perform read-ready and write-ready tests. The appropriate "Glib::IO" sources are added or removed from the "Glib::MainLoop" when notifiers are added or removed from the set, or when they change their "want_writeready" status. The callbacks are called automatically by Glib itself; no special methods on this loop object are required. CONSTRUCTOR
$loop = IO::Async::Loop::Glib->new() This function returns a new instance of a "IO::Async::Loop::Glib" object. It takes no special arguments. METHODS
There are no special methods in this subclass, other than those provided by the "IO::Async::Loop" base class. $count = $loop->loop_once( $timeout ) This method calls the "iteration()" method on the underlying "Glib::MainContext". If a timeout value is supplied, then a Glib timeout will be installed, to interrupt the loop at that time. If Glib indicates that any callbacks were fired, then this method will return 1 (however, it does not mean that any "IO::Async" callbacks were invoked, as there may be other parts of code sharing the Glib main context. Otherwise, it will return 0. SEE ALSO
o Glib - Perl wrappers for the GLib utility and Object libraries o Gtk2 - Perl interface to the 2.x series of the Gimp Toolkit library AUTHOR
Paul Evans <leonerd@leonerd.org.uk> perl v5.14.2 2013-03-01 IO::Async::Loop::Glib(3pm)

Check Out this Related Man Page

IO::Async::Timer::Absolute(3pm) 			User Contributed Perl Documentation			   IO::Async::Timer::Absolute(3pm)

NAME
"IO::Async::Timer::Absolute" - event callback at a fixed future time SYNOPSIS
use IO::Async::Timer::Absolute; use POSIX qw( mktime ); use IO::Async::Loop; my $loop = IO::Async::Loop->new; my @time = gmtime; my $timer = IO::Async::Timer::Absolute->new( time => mktime( 0, 0, 0, $time[4]+1, $time[5], $time[6] ), on_expire => sub { print "It's midnight "; $loop->stop; }, ); $loop->add( $timer ); $loop->run; DESCRIPTION
This subclass of IO::Async::Timer implements one-shot events at a fixed time in the future. The object waits for a given timestamp, and invokes its callback at that point in the future. For a "Timer" object that waits for a delay relative to the time it is started, see instead IO::Async::Timer::Countdown. EVENTS
The following events are invoked, either using subclass methods or CODE references in parameters: on_expire Invoked when the timer expires. PARAMETERS
The following named parameters may be passed to "new" or "configure": on_expire => CODE CODE reference for the "on_expire" event. time => NUM The epoch time at which the timer will expire. Once constructed, the timer object will need to be added to the "Loop" before it will work. Unlike other timers, it does not make sense to "start" this object, because its expiry time is absolute, and not relative to the time it is started. AUTHOR
Paul Evans <leonerd@leonerd.org.uk> perl v5.14.2 2012-10-24 IO::Async::Timer::Absolute(3pm)
Man Page