fix(bukkit): 收紧 Folia 调度与背包线程所有权#712
Open
zhibeigg wants to merge 1 commit into
Open
Conversation
避免无上下文同步任务错误落到全局区域线程,并让 UI、虚拟背包与 NMS 操作按玩家或区域线程执行;同时保证物品数量不足时不发生部分扣除。
11 tasks
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.
原有问题
Bukkit/Folia 调度与背包操作没有始终遵守对象所属线程:
典型触发场景与后果
takeList与实际背包状态不一致。本 PR 修改
CompletableFuture形式的非阻塞结果入口。takeList。修改目的
遵守 Bukkit 与 Folia 的线程模型,避免跨线程访问、区域线程阻塞和背包部分修改,保证 UI 与物品操作具备确定且原子的结果。
兼容性与行为变化
验证
git diff --checkRefs #703