new Synchronize()
Members
-
static tickCount
-
Number of ticks that have occurred
Methods
-
static init()
-
Initialize the Synchronize system
-
async, static nextTick()
-
Used by synchronus environments to indicate that a synchronous step has been taken.
Throws:
Error if used with an asynchronous environment (Config "environment-synchronous" ===
false
) -
static pauseWatchdog()
-
Pauses the watchdog. Primarily used in Breakpoint.
-
async, static register(cb)
-
Register a callback that will be triggered by
nextTick
. Internally this callsaddListener
on anEventEmitter
.Parameters:
Name Type Description cb
Promise.<function()> The callback to be called by
nextTick
-
async, static shutdown()
-
Terminate the Synchronization sub-system. Mostly used for testing.
-
static startWatchdog()
-
Restarts the watchdog. Primarily used in Breakpoint.
-
static syncWatchdog()
-
The default synchronus watchdog. Mostly used internally and exposed for testing.
-
async, static unregister(cb) → {Promise}
-
Removes a Synchronize listener
Parameters:
Name Type Description cb
function The callback function that was passed to
register
Returns:
Promise -A Promise that resolves when the listener has been removed.