execute: Fix some compatibility layer timing bugs (#8)
This commit is contained in:
1 file changed
+8
-2
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user