GreenRobot EventBus
suggest changeSyntax
- @Subscribe(threadMode = ThreadMode.POSTING) public void onEvent(EventClass event) { }
Parameters
| Thread Mode | Description |
|---|---|
ThreadMode.POSTING |
Called on the same thread that posted the event. This is the default mode. |
ThreadMode.MAIN |
Called on the main UI thread. |
ThreadMode.BACKGROUND |
Called on a background thread. If the posting thread is already a background thread, that thread is used. If the event is posted on the main thread, EventBus uses one background thread. |
ThreadMode.ASYNC |
Called on its own thread. |
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents