… | |
… | |
67 | |
67 | |
68 | =cut |
68 | =cut |
69 | |
69 | |
70 | package Coro; |
70 | package Coro; |
71 | |
71 | |
72 | use strict qw(vars subs); |
72 | use common::sense; |
73 | no warnings "uninitialized"; |
73 | |
|
|
74 | use Carp (); |
74 | |
75 | |
75 | use Guard (); |
76 | use Guard (); |
76 | |
77 | |
77 | use Coro::State; |
78 | use Coro::State; |
78 | |
79 | |
… | |
… | |
153 | handlers), then it must be prepared to be called recursively itself. |
154 | handlers), then it must be prepared to be called recursively itself. |
154 | |
155 | |
155 | =cut |
156 | =cut |
156 | |
157 | |
157 | $idle = sub { |
158 | $idle = sub { |
158 | require Carp; |
|
|
159 | Carp::croak ("FATAL: deadlock detected"); |
159 | Carp::confess ("FATAL: deadlock detected"); |
160 | }; |
160 | }; |
161 | |
161 | |
162 | # this coro is necessary because a coro |
162 | # this coro is necessary because a coro |
163 | # cannot destroy itself. |
163 | # cannot destroy itself. |
164 | our @destroy; |
164 | our @destroy; |