- 支持发布事件(post)、订阅事件(subscribe)、 解除订阅(unsubscribe)
- 一个事件可以有 多个订阅者,发送事件可以在任意线程发生
- 发布订阅:当发送A类型事件时,所有已订阅A类型事件的 订阅者会接收到回调
- 解除订阅: 某个订阅者解除A类型事件后,再有A类型的事件产生时,不再接收到回调
- 考虑线程安全问题
- 进阶
- 支持多线程事件消费能力,订阅事件时,支持消费线程的方式,如在 事件发送方线程消费、在异步线程池消费
-
Notifications
You must be signed in to change notification settings - Fork 0
noResign/EventBus
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
基于事件总线的发布/订阅框架
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published