diff --git a/src/compiler/execute.js b/src/compiler/execute.js index a37a98c5..bb140fc3 100644 --- a/src/compiler/execute.js +++ b/src/compiler/execute.js @@ -126,9 +126,15 @@ const executeInCompatibilityLayer = function*(inputs, blockFunction) { } while (thread.status === Thread.STATUS_YIELD || thread.status === Thread.STATUS_YIELD_TICK) { - // TODO: warp mode + // todo: handle warp mode + + if (thread.status === Thread.STATUS_YIELD) { + thread.status = Thread.STATUS_RUNNING; + } + yield; - thread.status = Thread.STATUS_RUNNING; + + // todo: do we have to check if returnValue is a promise at this point? returnValue = executeBlock(); }