Skip to content

Eventloop #97

@tramchamploo

Description

@tramchamploo
  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
  • An eventloop that execute tasks or schedule them at a fixed rate.
  • A selector that select the ready(full) queue.
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions