ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Coro.pm
(Generate patch)

Comparing Coro/Coro.pm (file contents):
Revision 1.94 by root, Sat Dec 2 18:01:30 2006 UTC vs.
Revision 1.96 by root, Mon Dec 4 03:48:16 2006 UTC

41 41
42our $idle; # idle handler 42our $idle; # idle handler
43our $main; # main coroutine 43our $main; # main coroutine
44our $current; # current coroutine 44our $current; # current coroutine
45 45
46our $VERSION = '3.0'; 46our $VERSION = '3.01';
47 47
48our @EXPORT = qw(async cede schedule terminate current unblock_sub); 48our @EXPORT = qw(async cede schedule terminate current unblock_sub);
49our %EXPORT_TAGS = ( 49our %EXPORT_TAGS = (
50 prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)], 50 prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)],
51); 51);
128handlers), then it must be prepared to be called recursively. 128handlers), then it must be prepared to be called recursively.
129 129
130=cut 130=cut
131 131
132$idle = sub { 132$idle = sub {
133 print STDERR "FATAL: deadlock detected\n"; 133 require Carp;
134 exit (51); 134 Carp::croak ("FATAL: deadlock detected");
135}; 135};
136 136
137# this coroutine is necessary because a coroutine 137# this coroutine is necessary because a coroutine
138# cannot destroy itself. 138# cannot destroy itself.
139my @destroy; 139my @destroy;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines