ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Async-Interrupt/t/01_basic.t
Revision: 1.1
Committed: Thu Jul 2 15:13:03 2009 UTC (17 years, 2 months ago) by root
Content type: application/x-troff
Branch: MAIN
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 BEGIN { $| = 1; print "1..8\n"; }
2    
3     use Async::Interrupt;
4    
5     my $ai = new Async::Interrupt
6     cb => sub { print "ok $_[0]\n" };
7    
8     print $$ai ? "" : "not ", "ok 1 # $$ai\n";
9    
10     my ($a, $b) = $ai->signal_func;
11    
12     print $a ? "" : "not ", "ok 2 # $a\n";
13     print $b ? "" : "not ", "ok 3 # $b\n";
14    
15     $ai->signal (4);
16    
17     print "ok 5\n";
18    
19     $ai->block;
20     $ai->signal (7);
21     print "ok 6\n";
22     $ai->unblock;
23     print "ok 8\n";
24    
25