# Namespace goog.async.run.`<THIS>`

code »

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

## Main

`<THIS>` run ( callback, opt_context )

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

## Classes

goog.async.run.WorkItem_ No Description.

Show:Public Protected Private

## Global Functions

code »goog.async.run.forceNextTick ( )

Forces goog.async.run to use nextTick instead of Promise. This should only be done in unit tests. It's useful because MockClock replaces nextTick, but not the browser Promise implementation, so it allows Promise-based code to be tested with MockClock.

code »goog.async.run.initializeRunner_ ( )

Initializes the function to use to process the work queue.

code »goog.async.run.processWorkQueue ( )

Run any pending goog.async.run work items. This function is not intended for general use, but for use by entry point handlers to run items ahead of goog.async.nextTick.

code »goog.async.run.resetQueue_ ( )

Reset the event queue.

code »goog.async.run.schedule_ ( )

The function used to schedule work asynchronousely.

## Global Properties

code »goog.async.run.workQueueScheduled_ : `boolean`
code »goog.async.run.workQueue_ : `!Array`