postToSubscription()
在这个方法中,实现了从发布者到调用者的调用过程。在这里有很重要的几个分支:
HandlerPosterPendingPostQueue
的消息队列中,然后通过主线程的Handler发送消息,最好在Handler.HandleMessage
中调用EventBus.invokeSubscriber
,来让订阅方法在主线程中执行。BackgroundPoster.PendingPostQueue
的消息队列中,由于该Poster实现了接口Runable
,于是将该Poster放入线程池中执行,在线程中调用EventBus.invokeSubscriber
。AsyncPoster
中,然后将该Poster放入线程池并调用EventBus.invokeSubscriber
。