Can someone please mention - and explain if possible - the issues related to threads that I need to consider when using guava eventbus ? When I subscribe an android Activity and annotate one of its methods with (@Subscribe), and then post an event from another thread, I got an exception that the event didn't got dispatched.
(I know I need to be on the UI thread to update the UI, that's not what I'm talking about. The event isn't event dispatched !)
EDIT: Here is an example :
post:(This runs in a networking thread)
eventBus.post(new EventShowToast("According to alarm \'" + alarm.getName() + "\', profile \'" + profile.getName() + "\' is run."));
subscribe:(a method in an activity, the activity register itself in onResume(...) )
@Subscribe
@AllowConcurrentEvents
public void showToast(EventShowToast event) {
showToast(event.getMsg());
}