Adds two new composition functions for composing multiple event queues:
EventQueue::background - The background function requires only a user-provided update function, which is called to indicate when the queue should be dispatched.
EventQueue::chain - The chain function chains one queue onto a target queue. Calling dispatch on the target queue will also dispatch events on the target, however each queue uses their own buffers and events are handled independently.
These two functions add a new level of composability to mbed-events. EventsQueues can be easily backgrounded on hardware timers, or even combined with existing event loops. Multiple, independent EventQueues can be combined to easily share a single thread of execution between module boundaries. These functions should add significant flexibility to how a user's system can be architected.
Adds two new composition functions for composing multiple event queues:
EventQueue::background
- The background function requires only a user-provided update function, which is called to indicate when the queue should be dispatched.EventQueue::chain
- The chain function chains one queue onto a target queue. Calling dispatch on the target queue will also dispatch events on the target, however each queue uses their own buffers and events are handled independently.These two functions add a new level of composability to mbed-events. EventsQueues can be easily backgrounded on hardware timers, or even combined with existing event loops. Multiple, independent EventQueues can be combined to easily share a single thread of execution between module boundaries. These functions should add significant flexibility to how a user's system can be architected.