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

Comparing Coro/Coro.pm (file contents):
Revision 1.137 by root, Wed Sep 26 19:26:48 2007 UTC vs.
Revision 1.139 by root, Thu Sep 27 15:52:30 2007 UTC

50 50
51our $idle; # idle handler 51our $idle; # idle handler
52our $main; # main coroutine 52our $main; # main coroutine
53our $current; # current coroutine 53our $current; # current coroutine
54 54
55our $VERSION = '3.7'; 55our $VERSION = '3.8';
56 56
57our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub); 57our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub);
58our %EXPORT_TAGS = ( 58our %EXPORT_TAGS = (
59 prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)], 59 prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)],
60); 60);
155 # call all destruction callbacks 155 # call all destruction callbacks
156 $_->(@{$self->{status}}) 156 $_->(@{$self->{status}})
157 for @{(delete $self->{destroy_cb}) || []}; 157 for @{(delete $self->{destroy_cb}) || []};
158} 158}
159 159
160sub _do_trace { 160sub _do_trace_sub {
161 $current->{_trace_cb}->(); 161 &{$current->{_trace_sub_cb}}
162}
163
164sub _do_trace_line {
165 &{$current->{_trace_line_cb}}
162} 166}
163 167
164# this coroutine is necessary because a coroutine 168# this coroutine is necessary because a coroutine
165# cannot destroy itself. 169# cannot destroy itself.
166my @destroy; 170my @destroy;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines