Synchronize()

A singleton class used to synchronize intrinsics, significance, and perceptions. There isn't a biological or cognitive analog, rather this is a crutch to overcome how digital systems interface with their environments.

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 calls addListener on an EventEmitter.

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.