ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/t/aio_test_common.pm
Revision: 1.1
Committed: Sun Jul 31 17:24:05 2005 UTC (19 years, 4 months ago) by root
Branch: MAIN
CVS Tags: rel-3_31, rel-4_81, rel-4_80, rel-2_32, rel-2_33, rel-2_31, rel-1_61, rel-4_17, rel-4_14, rel-4_15, rel-4_12, rel-4_11, rel-4_18, rel-4_19, rel-4_4, rel-4_5, rel-4_6, rel-4_7, rel-4_0, rel-4_1, rel-4_2, rel-4_3, rel-1_73, rel-1_72, rel-1_71, rel-2_6, rel-2_4, rel-2_5, rel-2_2, rel-2_3, rel-2_0, rel-2_1, rel-1_8, rel-1_1, rel-1_3, rel-1_2, rel-1_5, rel-1_4, rel-1_7, rel-3_65, rel-1_6, rel-4_78, rel-4_79, rel-4_74, rel-4_75, rel-4_76, rel-4_77, rel-4_71, rel-4_72, rel-4_73, rel-2_21, rel-3_71, rel-3_7, rel-3_6, rel-3_5, rel-3_4, rel-3_3, rel-3_2, rel-3_1, rel-3_0, rel-3_9, rel-3_8, rel-2_51, rel-3_261, rel-3_01, rel-3_02, rel-3_03, rel-3_04, rel-3_05, rel-3_06, rel-3_07, rel-4_52, rel-4_53, rel-4_51, rel-4_54, rel-2_41, rel-3_93, rel-3_92, rel-3_91, rel-3_19, rel-3_18, rel-3_17, rel-3_16, rel-3_15, rel-4_34, rel-3_26, rel-3_25, rel-3_22, rel-3_23, rel-3_21, rel-4_31, rel-4_32, rel-4_33, rel-2_61, rel-2_62, HEAD
Log Message:
*** empty log message ***

File Contents

# Content
1 use IO::AIO;
2
3 package aio_test_common;
4
5 use strict;
6 require Exporter;
7 use vars qw(@ISA @EXPORT);
8 use File::Temp ();
9
10 @ISA = qw(Exporter);
11 @EXPORT = qw(pcb tempdir);
12
13 sub tempdir {
14 return File::Temp::tempdir( CLEANUP => 1 );
15 }
16
17 sub pcb {
18 while (IO::AIO::nreqs) {
19 my $rfd = ""; vec ($rfd, IO::AIO::poll_fileno, 1) = 1; select $rfd, undef, undef, undef;
20 IO::AIO::poll_cb;
21 }
22 }
23
24 1;
25