buffer-slayer icon indicating copy to clipboard operation
buffer-slayer copied to clipboard

Eventloop

Open tramchamploo opened this issue 6 years ago • 0 comments

  1. Invent an eventloop to schedule queue flush, so thread count is not reporter-bounded.
  2. Each queue are bounded to specific eventloop, so there will be only one consumer.
  3. A MPSC queue is used to schedule tasks. The messages will also be offered in this sort of queue.
  4. So the message queue will be non-blocking, which means the block overflow-strategy will no longer exist.
  5. So if a message is rejected, users want it blocked should implement their own RejectedHandler
  • [x] An eventloop that execute tasks or schedule them at a fixed rate.
  • [ ] A selector that select the ready(full) queue.
  • [x] Use jctools MPSC queue as the message queue.
  • [ ] Adjust overflow strategy to make compatible with the message queue.
  • [ ] AsyncReporter binds a queue to an eventloop when created.
  • [ ] Schedule a flush task of a message queue at a fixed rate to the eventloop.

tramchamploo avatar Mar 22 '18 03:03 tramchamploo