Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

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

IO::Async::LoopTests(3pm)				User Contributed Perl Documentation				 IO::Async::LoopTests(3pm)

NAME
"IO::Async::LoopTests" - acceptance testing for "IO::Async::Loop" subclasses SYNOPSIS
use IO::Async::LoopTests; run_tests( 'IO::Async::Loop::Shiney', 'io' ); DESCRIPTION
This module contains a collection of test functions for running acceptance tests on IO::Async::Loop subclasses. It is provided as a facility for authors of such subclasses to ensure that the code conforms to the Loop API required by "IO::Async". TIMING
Certain tests require the use of timers or timed delays. Normally these are counted in units of seconds. By setting the environment variable "TEST_QUICK_TIMERS" to some true value, these timers run 10 times quicker, being measured in units of 0.1 seconds instead. This value may be useful when running the tests interactively, to avoid them taking too long. The slower timers are preferred on automated smoke-testing machines, to help guard against false negatives reported simply because of scheduling delays or high system load while testing. TEST_QUICK_TIMERS=1 ./Build test FUNCTIONS
run_tests( $class, @tests ) Runs a test or collection of tests against the loop subclass given. The class being tested is loaded by this function; the containing script does not need to "require" or "use" it first. This function runs "Test::More::plan" to output its expected test count; the containing script should not do this. TEST SUITES
The following test suite names exist, to be passed as a name in the @tests argument to "run_tests": io Tests the Loop's ability to watch filehandles for IO readiness timer Tests the Loop's ability to handle timer events signal Tests the Loop's ability to watch POSIX signals idle Tests the Loop's support for idle handlers child Tests the Loop's support for watching child processes by PID control Tests that the "run", "stop", "loop_once" and "loop_forever" methods behave correctly AUTHOR
Paul Evans <leonerd@leonerd.org.uk> perl v5.14.2 2012-10-24 IO::Async::LoopTests(3pm)

Check Out this Related 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)
Man Page