add BlockUtility.yieldTick

This commit is contained in:
Michael "Z" Goddard 2018-06-06 10:13:29 -04:00
parent 84705fc463
commit 9311a274d5
No known key found for this signature in database
GPG key ID: 762CD40DD5349872

View file

@ -57,6 +57,13 @@ class BlockUtility {
this.thread.status = Thread.STATUS_YIELD;
}
/**
* Set the thread to yield until the next tick of the runtime.
*/
yieldTick () {
this.thread.status = Thread.STATUS_YIELD_TICK;
}
/**
* Start a branch in the current block.
* @param {number} branchNum Which branch to step to (i.e., 1, 2).