Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: work-around-me…
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (16 sloc) 0.455 kb
# vim: ts=2 sw=2 noexpandtab
# Watch signals a few different ways.
use warnings;
use strict;
use lib qw(../lib);
use Reflex::Signal;
use ExampleHelpers qw(eg_say);
eg_say("Process $$ is waiting for SIGUSR1 twice.");
my $usr1_a = Reflex::Signal->new(
signal => "USR1",
on_signal => sub { eg_say("Got SIGUSR1 callback.") },
);
my $usr1_b = Reflex::Signal->new( signal => "USR1" );
while ($usr1_b->next()) {
eg_say("Got SIGUSR1 from promise.");
}
Jump to Line
Something went wrong with that request. Please try again.