mirror of
https://github.com/janet-lang/janet
synced 2024-11-25 01:37:19 +00:00
Allow yielding from root fiber to ev loop.
This commit is contained in:
parent
8286b33c52
commit
7ae7984f3c
@ -520,7 +520,7 @@ static void run_one(JanetFiber *fiber, Janet value, JanetSignal sigin) {
|
|||||||
fiber->flags &= ~JANET_FIBER_FLAG_SCHEDULED;
|
fiber->flags &= ~JANET_FIBER_FLAG_SCHEDULED;
|
||||||
Janet res;
|
Janet res;
|
||||||
JanetSignal sig = janet_continue_signal(fiber, value, &res, sigin);
|
JanetSignal sig = janet_continue_signal(fiber, value, &res, sigin);
|
||||||
if (sig != JANET_SIGNAL_EVENT) {
|
if (sig != JANET_SIGNAL_EVENT && sig != JANET_SIGNAL_YIELD) {
|
||||||
if (fiber->done_channel) {
|
if (fiber->done_channel) {
|
||||||
JanetChannel *chan = (JanetChannel *)(fiber->done_channel);
|
JanetChannel *chan = (JanetChannel *)(fiber->done_channel);
|
||||||
janet_channel_push(chan, janet_wrap_fiber(fiber), 2);
|
janet_channel_push(chan, janet_wrap_fiber(fiber), 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user