mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 06:23:37 -05:00
Add retireThread
to seqeuencer
This commit is contained in:
parent
94e389c8fb
commit
43f3b59f7c
1 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue