提供有界的主线程游戏动作队列 - #34
Closed
hby7921 wants to merge 1 commit into
Closed
Conversation
Owner
|
非常感谢你认真完成并提交这套实现。也向你真诚道歉:这是我的疏忽,我没有及时看到 #34 已经提交,就又实现并合并了 #35,造成了重复劳动。 我随后逐项对照了两套实现。这个 PR 对 FIFO、队列容量、排队取消、停止、恢复入口、异常隔离和 durable operation 去重的方向是正确的;当前
对应文档示例已经放在 再次感谢你把 #33 从问题描述推进到完整实现。这次重复完全是维护侧没有及时发现 PR、协调不到位造成的,抱歉浪费了你的时间。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动
新增
QueuedGameActionHandler,为IGameActionHandler提供通用的宿主线程动作交接实现。支持:
Pump(maximumWorkItems)控制每次处理数量;ExecuteAsync和RecoverAsync使用同一个主线程入口;GameActionReceipt、operationId和generationId。宿主只需要在游戏 Tick 中调用
Pump,并在执行回调中完成游戏状态验证和实际修改。测试
增加了队列上限、Pump 限制、取消竞态、关闭竞态、恢复线程、异常隔离,以及 Durable Dispatcher 重复 operationId 测试。
Fixes #33