Skip to content

Commit 665bf9a

Browse files
authored
Merge pull request scratchfoundation#1305 from paulkaplan/fix-broadcast-wait
Fix tick yielding threads
2 parents 6c118cf + 24355c6 commit 665bf9a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/engine/sequencer.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ class Sequencer {
221221
// until the promise resolves. Promise resolution should reset
222222
// thread.status to Thread.STATUS_RUNNING.
223223
return;
224+
} else if (thread.status === Thread.STATUS_YIELD_TICK) {
225+
// stepThreads will reset the thread to Thread.STATUS_RUNNING
226+
return;
224227
}
225228
// If no control flow has happened, switch to next block.
226229
if (thread.peekStack() === currentBlockId) {

0 commit comments

Comments
 (0)