Skip to content
Stephan Zeisberg edited this page Feb 18, 2016 · 3 revisions

Queue architecture

The event queue architecture is based on a parent/child relationship. This relationship has the following properties:

  • If an event is pushed to a child queue, an event-link is pushed to the parent queue
  • If an event is removed from a child queue, the corresponding event-link is removed from the parent-queue and vice-versa
  • A child queue has only one parent queue
  • A parent queue has 0-n child queue(s)

The queuing mechanism is visualized in the following graphic:

This method of queuing events allows to prioritize a single child event queue(s) (when in idle state the main loop polls the parent queue). Thus, this allows us to temporarily stop processing event(s) from the parent queue and focus on a single child queue.

Credits

neovim project uses a similar event queue architecture, based on a different queue library.

Clone this wiki locally