Merge pull request #1305 from paulkaplan/fix-broadcast-wait

Fix tick yielding threads
This commit is contained in:
Paul Kaplan 2018-07-09 13:41:55 -04:00 committed by GitHub
commit 665bf9a322
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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) {