Fix tick yielding threads

This commit is contained in:
Paul Kaplan 2018-07-05 14:56:00 -04:00
parent 06573f4624
commit 24355c6e6d

View file

@ -221,6 +221,9 @@ class Sequencer {
// until the promise resolves. Promise resolution should reset
// thread.status to Thread.STATUS_RUNNING.
return;
} else if (thread.status === Thread.STATUS_YIELD_TICK) {
// stepThreads will reset the thread to Thread.STATUS_RUNNING
return;
}
// If no control flow has happened, switch to next block.
if (thread.peekStack() === currentBlockId) {