> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dispatch

> IGameInputDispatcher::Dispatch

Executes work in the dispatcher's queue.

## Syntax

```cpp theme={null}
bool Dispatch(
    uint64_t quotaInMicroseconds
);
```

### Parameters

*quotaInMicroseconds*   \_In\_\
Type: uint64\_t

The amount of time that the dispatcher has to execute tasks. The dispatcher will attempt to keep processing time within the provided duration, but this is not a guaranteed limit.

### Return value

Type: bool

Returns true if  work items are pending in the dispatcher's queue. Returns false if no work items remain. Returns at the time that the queue is flushed.

## Remarks

The `IGameInputDispatcher::Dispatch` executes work in the dispatcher's queue. This method flushes at least one item from the queue even if the `quotaInMicroseconds` parameter is set to zero. You can call with a quota time of zero to execute a single item and then decide whether to dispatch more items depending on the time elapsed. For intermediate and advanced use-cases of the GameInput API, see [Advanced GameInput topics](https://docs.xbox.com/build/core-features/common/input/advanced/input-advanced-topics.md).

## Requirements

**Header:** GameInput.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[Overview of GameInput](https://docs.xbox.com/build/core-features/common/input/overviews/input-overview.md)\
[IGameInputDispatcher](https://docs.xbox.com/reference/input/gameinput/interfaces/IGameInputDispatcher/igameinputdispatcher.md)

## Version History

| Version | Changes |
| - | - |
| **v0** | Introduced. |


## Related topics

- [Dispatch](https://docs.xbox.com/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_dispatch_public.md)
- [Dispatch task queue](https://docs.xbox.com/build/core-features/common/async/async-libraries/async-library-xtaskqueue-example-dispatch-task-queue.md)
- [XTaskQueueDispatch](https://docs.xbox.com/reference/system/xtaskqueue/functions/xtaskqueuedispatch.md)
- [XTaskQueueDispatchMode](https://docs.xbox.com/reference/system/xtaskqueue/enums/xtaskqueuedispatchmode.md)
- [D3D12_DISPATCH_ARGUMENTS](https://docs.xbox.com/reference/graphics/d3d12/structs/d3d12_dispatch_arguments_public.md)
