buffer-slayer
buffer-slayer copied to clipboard
Eventloop
- Invent an eventloop to schedule queue flush, so thread count is not reporter-bounded.
- Each queue are bounded to specific eventloop, so there will be only one consumer.
- A MPSC queue is used to schedule tasks. The messages will also be offered in this sort of queue.
- So the message queue will be non-blocking, which means the
block
overflow-strategy will no longer exist. - 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.