ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/t/05_priority.t
Revision: 1.2
Committed: Tue May 20 23:57:13 2008 UTC (16 years, 1 month ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-3_51, rel-3_53, rel-3_52, rel-3_7, rel-3_6, rel-3_9, rel-3_8, rel-3_49, rel-3_44, rel-3_41, rel-3_42, rel-3_43, rel-3_48, rel-3_431
Changes since 1.1: +7 -7 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 BEGIN { $| = 1; print "1..9\n"; }
2    
3     no warnings;
4     use strict;
5    
6     use EV;
7    
8 root 1.2 my $t0 = EV::timer -1, 0, sub { print "ok 4\n" };
9     my $t_ = EV::timer -1, 0, sub { print "ok 5\n" }; $t_->priority (-1);
10     my $t1 = EV::timer -1, 0, sub { print "ok 3\n" }; $t1->priority ( 1);
11 root 1.1
12 root 1.2 my $i2 = EV::idle sub { print EV::loop_count == 1 ? "" : "not ", "ok 2\n"; $_[0]->stop }; $i2->priority (10);
13     my $i0 = EV::idle sub { print EV::loop_count == 3 ? "" : "not ", "ok 7\n"; $_[0]->stop };
14     my $i1 = EV::idle sub { print EV::loop_count == 2 ? "" : "not ", "ok 6\n"; $_[0]->stop }; $i1->priority ( 1);
15     my $i_ = EV::idle sub { print EV::loop_count == 4 ? "" : "not ", "ok 8\n"; $_[0]->stop }; $i_->priority (-1);
16 root 1.1
17     print "ok 1\n";
18     EV::loop;
19     print "ok 9\n";