简体   繁体   English

从多个队列读取与编年史事件循环

[英]Reading from multiple queues vs chronicle event loop

What is the recommended approach to using chronicle event loop with chronicle queues, eg if I want to read from 2 queues - can it be done using event loop?将编年史事件循环与编年史队列一起使用的推荐方法是什么,例如,如果我想从 2 个队列中读取 - 可以使用事件循环来完成吗? (preferrably with each reader running on it's own thread/core) (最好让每个阅读器在自己的线程/核心上运行)

The EventLoop is useful when you want to share multiple readers and other actions in a single thread.当您想在单个线程中共享多个阅读器和其他操作时, EventLoop很有用。 If you want to use a thread each, I would suggest using an ExecutorService or a new Thread如果您想分别使用一个线程,我建议您使用ExecutorServicenew Thread

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM