# Namespace goog.async

code »
Show:Public Protected Private

## Global Functions

code »`<SCOPE>` goog.async.nextTick ( callback, opt_context )

Fires the provided callbacks as soon as possible after the current JS execution context. setTimeout(…, 0) takes at least 4ms when called from within another setTimeout(…, 0) for legacy reasons. This will not schedule the callback as a microtask (i.e. a task that can preempt user input or networking callbacks). It is meant to emulate what setTimeout(_, 0) would do if it were not throttled. If you desire microtask behavior, use goog.Promise instead.

Parameters
callback: `function(this: SCOPE)` Callback function to fire as soon as possible. opt_context: `SCOPE=` Object in whose scope to call the listener.

code »`<THIS>` goog.async.run ( callback, opt_context )

Fires the provided callback just before the current callstack unwinds, or as soon as possible after the current JS execution context.

Parameters
callback opt_context: `THIS=` Object to use as the "this value" when calling the provided function.

code »goog.async.throwException ( exception )

Throw an item without interrupting the current execution context. For example, if processing a group of items in a loop, sometimes it is useful to report an error while still allowing the rest of the batch to be processed.

Parameters
exception