Dispatching events can follow two different models. One is called single-threaded dispatching model and the other multiple-threaded dispatching model.
事件分发遵循两种不同的模型。单线程分发模型和多线程分发模型。
Multiple-threaded dispatching can easily raise synchronization issues. It generates multiple event processing threads, which might interfere with each other.
多线程分发很容易产生同步问题,它产生多个可能互相干扰的事件处理线程。
In multiple-threaded dispatching model, the thread fetching the events from the queue launches another thread called task thread, and hand the event over to it for processing.
在多线程分发模型中,从队列中获取事件的线程启动另一个被称作任务线程的线程,并把事件交给它处理。
应用推荐