… | |
… | |
2248 | slf_init_terminate_cancel_common (aTHX_ frame, coro_hv); |
2248 | slf_init_terminate_cancel_common (aTHX_ frame, coro_hv); |
2249 | } |
2249 | } |
2250 | else |
2250 | else |
2251 | { |
2251 | { |
2252 | struct coro *self = SvSTATE_current; |
2252 | struct coro *self = SvSTATE_current; |
|
|
2253 | |
|
|
2254 | if (!self) |
|
|
2255 | croak ("Coro::cancel called outside of thread content,"); |
2253 | |
2256 | |
2254 | /* otherwise we cancel directly, purely for speed reasons |
2257 | /* otherwise we cancel directly, purely for speed reasons |
2255 | * unfortunately, this requires some magic trickery, as |
2258 | * unfortunately, this requires some magic trickery, as |
2256 | * somebody else could cancel us, so we have to fight the cancellation. |
2259 | * somebody else could cancel us, so we have to fight the cancellation. |
2257 | * this is ugly, and hopefully fully worth the extra speed. |
2260 | * this is ugly, and hopefully fully worth the extra speed. |