mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-29 07:29:12 -04:00
Remove VM-locking yield mode per discussion
This commit is contained in:
parent
9a7ab57f6f
commit
6daee9a70e
4 changed files with 2 additions and 44 deletions
src/engine
|
@ -52,21 +52,13 @@ Thread.STATUS_RUNNING = 0;
|
|||
*/
|
||||
Thread.STATUS_YIELD = 1;
|
||||
|
||||
/**
|
||||
* Thread status for a yielded thread that should block all other threads.
|
||||
* This is desirable when an asynchronous capability should appear to take
|
||||
* a synchronous amount of time (e.g., color touching color).
|
||||
* @const
|
||||
*/
|
||||
Thread.STATUS_YIELD_BLOCK = 2;
|
||||
|
||||
/**
|
||||
* Thread status for a finished/done thread.
|
||||
* Thread is moved to this state when the interpreter
|
||||
* can proceed with execution.
|
||||
* @const
|
||||
*/
|
||||
Thread.STATUS_DONE = 3;
|
||||
Thread.STATUS_DONE = 2;
|
||||
|
||||
/**
|
||||
* Push stack and update stack frames appropriately.
|
||||
|
@ -139,13 +131,6 @@ Thread.prototype.yield = function () {
|
|||
this.status = Thread.STATUS_YIELD;
|
||||
};
|
||||
|
||||
/**
|
||||
* Yields the thread and blocks other threads until unyielded.
|
||||
*/
|
||||
Thread.prototype.yieldAndBlock = function () {
|
||||
this.status = Thread.STATUS_YIELD_BLOCK;
|
||||
};
|
||||
|
||||
/**
|
||||
* Add an execution-synced timeouts for this thread.
|
||||
* See also: util/yieldtimers.js:timeout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue