… | |
… | |
1824 | { |
1824 | { |
1825 | /* nothing to schedule: call the idle handler */ |
1825 | /* nothing to schedule: call the idle handler */ |
1826 | if (SvROK (sv_idle) |
1826 | if (SvROK (sv_idle) |
1827 | && SvOBJECT (SvRV (sv_idle))) |
1827 | && SvOBJECT (SvRV (sv_idle))) |
1828 | { |
1828 | { |
|
|
1829 | if (SvRV (sv_idle) == SvRV (coro_current)) |
|
|
1830 | croak ("FATAL: $Coro::IDLE blocked itself - did you try to block inside an event loop callback? Caught"); |
|
|
1831 | |
1829 | ++coro_nready; /* hack so that api_ready doesn't invoke ready hook */ |
1832 | ++coro_nready; /* hack so that api_ready doesn't invoke ready hook */ |
1830 | api_ready (aTHX_ SvRV (sv_idle)); |
1833 | api_ready (aTHX_ SvRV (sv_idle)); |
1831 | --coro_nready; |
1834 | --coro_nready; |
1832 | } |
1835 | } |
1833 | else |
1836 | else |