https://github.com/jwpttcg66/game-executor
采用Reactor模式,注册readycreate, readyfinish事件到更新服务UpdateService,通过处理后进行模型缓存,然后将消息转化为 dispatchThread消息分配模型需要的create, update, finish的事件进行单线程循环调度 。调度过程使用了系统预置锁模型,来进行多线程唤醒机制,将所有的update循环检测进行多 线程调度,多线程更新服务使用future-listener机制,在完成调度后,根据模型状态,如果模型存活重新将消息转化为update 事件注册到dispatchThread消息分配模型进行循环处理。如果模型死亡将消息转化为readyfinish事件注册到更新服务UpdateServic进行销毁 。这个系统实现了模型自动缓存,多线程异步循环调度模型更新,自动处理模型死亡事件进行销毁。 支持将多个updater绑定到同一个更新线程上,减少线程调度。
https://github.com/jwpttcg66/game-executor
async-event-bus common-pool2 disruptor disruptor-executor event-bus eventbus executor fixedupdateservice game game-engine game-executor gameengine gameexecutor update updateservice updateservice-eventbus
Last synced: 10 days ago
JSON representation
采用Reactor模式,注册readycreate, readyfinish事件到更新服务UpdateService,通过处理后进行模型缓存,然后将消息转化为 dispatchThread消息分配模型需要的create, update, finish的事件进行单线程循环调度 。调度过程使用了系统预置锁模型,来进行多线程唤醒机制,将所有的update循环检测进行多 线程调度,多线程更新服务使用future-listener机制,在完成调度后,根据模型状态,如果模型存活重新将消息转化为update 事件注册到dispatchThread消息分配模型进行循环处理。如果模型死亡将消息转化为readyfinish事件注册到更新服务UpdateServic进行销毁 。这个系统实现了模型自动缓存,多线程异步循环调度模型更新,自动处理模型死亡事件进行销毁。 支持将多个updater绑定到同一个更新线程上,减少线程调度。
- Host: GitHub
- URL: https://github.com/jwpttcg66/game-executor
- Owner: jwpttcg66
- License: apache-2.0
- Created: 2017-01-06T02:17:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-01T06:45:02.000Z (almost 8 years ago)
- Last Synced: 2025-03-26T03:33:21.076Z (27 days ago)
- Topics: async-event-bus, common-pool2, disruptor, disruptor-executor, event-bus, eventbus, executor, fixedupdateservice, game, game-engine, game-executor, gameengine, gameexecutor, update, updateservice, updateservice-eventbus
- Language: Java
- Homepage:
- Size: 334 KB
- Stars: 32
- Watchers: 3
- Forks: 37
- Open Issues: 0