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

# IGameInputDispatcher::Dispatch

> IGameInputDispatcher::Dispatch

# IGameInputDispatcher::Dispatch

执行调度程序队列中的工作。

## 语法

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

### 参数

*quotaInMicroseconds*   \_In\_\
类型：uint64\_t

调度程序执行任务的时间量。调度程序将尝试将处理时间保持在所提供的持续时间内，但这不是硬性限制。

### 返回值

类型：bool

如果调度程序队列中有待处理的工作项，则返回 true。如果没有剩余工作项，则返回 false。在队列被清空时返回。

## 备注

`IGameInputDispatcher::Dispatch` 执行调度程序队列中的工作。即使 `quotaInMicroseconds` 参数设置为零，此方法也会至少从队列中处理一个项目。可以在配额时间为零时调用它以执行单个项目，然后根据已用时间决定是否调度更多项目。有关 GameInput API 的中级和高级用例，请参阅 [高级 GameInput 主题](/build/core-features/common/input/advanced/input-advanced-topics)。

## 要求

**标头：** GameInput.h

**库：** xgameruntime.lib

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[GameInput 概述](/build/core-features/common/input/overviews/input-overview)\
[IGameInputDispatcher](/reference/input/gameinput/interfaces/IGameInputDispatcher/igameinputdispatcher)

## 版本历史

| 版本     | 变更  |
| ------ | --- |
| **v0** | 引入。 |


## Related topics

- [IGameInput::CreateDispatcher](/zh-CN/reference/input/gameinput/interfaces/igameinput/methods/igameinput_createdispatcher.md)
- [IGameInputDispatcher::OpenWaitHandle](/zh-CN/reference/input/gameinput/interfaces/IGameInputDispatcher/methods/igameinputdispatcher_openwaithandle.md)
- [GameInput 工作队列](/zh-CN/build/core-features/common/input/advanced/input-work-queues.md)
- [GameInput](/zh-CN/reference/input/gameinput/gameinput_members.md)
- [Dispatch](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_dispatch_public.md)
