Dispatching events can follow two different models. One is called single-threaded dispatching model and the other multiple-threaded dispatching model.
事件分发遵循两种不同的模型。单线程分发模型和多线程分发模型。
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.
在多线程分发模型中,从队列中获取事件的线程启动另一个被称作任务线程的线程,并把事件交给它处理。
Threaded programs also run into a few problems that are not normally seen with multiple processes and IPC.
线程程序有时会出现在多进程和IPC 程序设计中不常出现的一些问题。
A newer, threaded, model is called worker, which USES multiple processes, each with multiple threads to get better performance with lower overhead.
较新的线程化模型称为worker,它使用多个进程,每个进程又有多个线程,这样就能以较低的开销获得更好的性能。
Dequeuing is single threaded, even if the message flow itself is configured for multiple instances.
退出队列是一个单线程操作,即使消息流本身配置为多实例时也是如此。
Multiple-threaded dispatching can easily raise synchronization issues. It generates multiple event processing threads, which might interfere with each other.
多线程分发很容易产生同步问题,它产生多个可能互相干扰的事件处理线程。
Multiple-threaded dispatching can easily raise synchronization issues. It generates multiple event processing threads, which might interfere with each other.
多线程分发很容易产生同步问题,它产生多个可能互相干扰的事件处理线程。
应用推荐