ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/t/06_prio.t
Revision: 1.1
Committed: Tue Aug 14 14:56:22 2001 UTC (22 years, 10 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-2_5, rel-2_0, rel-2_1, rel-1_1, rel-1_0, rel-1_9, rel-1_2, rel-1_5, rel-1_4, rel-1_7, rel-1_6, rel-1_31, stack_sharing
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 $|=1;
2     print "1..10\n";
3    
4     use Coro qw(:prio cede async current);
5    
6     print "ok 1\n";
7    
8     (async { print "ok 2\n"; cede; print "ok 3\n" })->prio(10);
9     (async { print "ok 4\n" })->prio(2);
10     (async { print "ok 5\n" })->prio(PRIO_HIGH);
11     (async { print "ok 6\n" });
12     (async { print "ok 7\n" })->prio(PRIO_LOW);
13     (async { print "ok 8\n" })->prio(PRIO_IDLE);
14     (async { print "ok 9\n"; cede; print "ok 11\n" })->prio(-500);
15    
16     current->prio(-100);
17     cede;
18     print "ok 10\n";