Check for blocking case in stepToReporter

This commit is contained in:
Tim Mickel 2016-06-20 16:47:42 -04:00
parent 405ad1044e
commit 09b9c506a9

View file

@ -167,7 +167,8 @@ Sequencer.prototype.stepToReporter = function (thread, blockId, inputName) {
currentStackFrame.waitingReporter = inputName; currentStackFrame.waitingReporter = inputName;
// Actually execute the block. // Actually execute the block.
this.startThread(thread); this.startThread(thread);
if (thread.status === Thread.STATUS_YIELD) { if (thread.status === Thread.STATUS_YIELD ||
thread.status === Thread.STATUS_YIELD_BLOCK) {
// Reporter yielded; caller must wait for it to unyield. // Reporter yielded; caller must wait for it to unyield.
// The value will be populated once the reporter unyields, // The value will be populated once the reporter unyields,
// and passed up to the currentStackFrame on next execution. // and passed up to the currentStackFrame on next execution.