NAME
ZMQ::Raw::Loop::Event - Event class
VERSION
version 0.39
DESCRIPTION
A ZMQ::Raw::Loop::Event represents an event, usable in a ZMQ::Raw::Loop.
WARNING: The API of this module is unstable and may change without warning (any change will be appropriately documented in the changelog).
SYNOPSIS
use ZMQ::Raw;
my $event = ZMQ::Raw::Loop::Event->new
(
$ctx,
on_set => sub
{
print "Event set!\n";
},
timeout => 10000,
on_timeout =>
{
print "Event timed out\n";
}
);
my $timer = ZMQ::Raw::Loop::Timer->new
(
timer => ZMQ::Raw::Timer->new ($ctx, after => 100),
on_timeout => sub
{
$event->set;
},
);
my $loop = ZMQ::Raw::Loop->new;
$loop->add ($event);
$loop->run;
METHODS
new( $context, %args )
Create a new loop event
set( )
Set the event
reset( )
Reset the event
AUTHOR
Jacques Germishuys <jacquesg@striata.com>
LICENSE AND COPYRIGHT
Copyright 2017 Jacques Germishuys.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.