Replies: 2 comments 6 replies
-
目前想的是可以先正常返回 等处理完在做一些后续的通知之类的 不知道能不能行 会不会有些业务不适用 |
Beta Was this translation helpful? Give feedback.
0 replies
-
如果数据访问的频率不高,可以使用原子类型来存储值,并使用 |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
folia是多线程tick的 我的某个数据是被大家共享的 可能会并发修改 如果加锁 会使问题复杂化 因为可能一次操作会涉及多个业务 修改多条数据 排序加锁也很复杂 使用任务队列的形式可以避免加锁 但是有些调用又是同步的 使用CompletableFuture的话会让folia的线程阻塞等待 玩家会感觉很卡 有什么好的解决方案吗 提前谢谢大家了
Beta Was this translation helpful? Give feedback.
All reactions