greenrobot / EventBus

Event bus for Android and Java that simplifies communication between Activities, Fragments, Threads, Services, etc. Less code, better quality.
http://greenrobot.org/eventbus/
Apache License 2.0
24.67k stars 4.66k forks source link

Non Android ThreadMode behaviour #692

Closed guoci closed 2 years ago

guoci commented 2 years ago

On non-Android JVMs ThreadModes MAIN and MAIN_ORDERED follow the same behavior as documented for POSTING. Is that a feature or a bug? The documentation for MAIN and MAIN_ORDERED seems to be only for Android.

greenrobot-team commented 2 years ago

https://github.com/greenrobot/EventBus/blob/1d995077d0b620a6aae9c60a8b96443113752305/EventBus/src/org/greenrobot/eventbus/ThreadMode.java#L38

Docs also say that this is the behavior if not Android, no?

guoci commented 2 years ago

Looks like MAIN is documented correctly in the code for non-Android JVMs. But MAIN_ORDERED doesn't document the non-Android behavior. Also, I was referring to the documentation on https://greenrobot.org/eventbus/documentation/delivery-threads-threadmode/ for my original post.

greenrobot-team commented 2 years ago

@guoci Thanks for the hint, updated that page.