# ActionQueue

class `Util.``ActionQueue`()

  A queue of [Action]s to be evaluated. Some number of actions are allowed to be active at once Settable via the constructor.

  ## Index

  Constructors

  - `constructor`

  Methods

  - `isIdle`
  - `push`
  - `waitForIdle`

## Constructors

`Util.ActionQueue.``constructor`()
  ActionQueue(maxActivePromises: number, suppressFailures: boolean): `ActionQueue`

  Creates a new [ActionQueue]

  Parameters

  > maxActivePromises: number

  > > Max number of promises to leave open before they begin getting deferred

  > suppressFailures: boolean

  > > Whether or not rejected promises and actions that throw cause the queue to fail

  Returns: `ActionQueue`

## Methods

`Util.ActionQueue.``isIdle`()
  isIdle(): boolean

  Returns `true` if there are no actions waiting to be evaluated

  Returns: boolean

  > Boolean indicating idle status

`Util.ActionQueue.``push`()
  push(action: `ActionLike`): void

  Pushes a new [ActionLike] to be evaluated onto the queue

  Parameters

  > action: `ActionLike`

  Returns: void

`Util.ActionQueue.``waitForIdle`()
  waitForIdle(): Promise

  Returns a `Promise<void>` that resolves when all actions have been completed or rejects if there was a failure

  It should be noted that if the queue is configured not to suppress failures and an action throws an error, any deferred actions (actions that were queued but not active at the time of the failure) will be cleared from the queue and will not be evaluated

  Returns: Promise

  > A promise that resolves/rejects when all actions have been completed

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Visualize Web or choose a sample question below to start a conversation:

What is HOOPS Visualize Web?
What are the latest release notes for HOOPS Visualize Web?
How do I start evaluating HOOPS Visualize Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...