… | |
… | |
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 | |
|
|
160 | sub _do_trace { |
|
|
161 | $current->{_trace_cb}->(); |
|
|
162 | } |
|
|
163 | |
160 | # this coroutine is necessary because a coroutine |
164 | # this coroutine is necessary because a coroutine |
161 | # cannot destroy itself. |
165 | # cannot destroy itself. |
162 | my @destroy; |
166 | my @destroy; |
163 | my $manager; |
167 | my $manager; |
164 | |
168 | |