Add retireThread to seqeuencer

This commit is contained in:
Tim Mickel 2016-08-23 15:53:34 -04:00
parent 94e389c8fb
commit 43f3b59f7c

View file

@ -166,4 +166,14 @@ Sequencer.prototype.proceedThread = function (thread) {
} }
}; };
/**
* Retire a thread in the middle, without considering further blocks.
* @param {!Thread} thread Thread object to retire.
*/
Sequencer.prototype.retireThread = function (thread) {
thread.stack = [];
thread.stackFrame = [];
thread.setStatus(Thread.STATUS_DONE);
};
module.exports = Sequencer; module.exports = Sequencer;