Note! This project has moved to github.com/armmbed/mbed-events
This repository has been superceded
This project has moved to mbed-events
Composable event loops combine the cheap synchronicity of event loops with the composability of preempted threads.
Two modular event queue classes are provided:
- EventLoop - for loops coupled with a c++ managed thread
- EventQueue - for manually managed event queues
The Event class takes advantage of the extensibility of FuncPtr to allow an event to be passed through APIs as a normal function.
More information on composable event loops.
Diff: EventLoop.cpp
- Revision:
- 20:2f9d9c53a5af
- Parent:
- 16:ff5d48fcce1b
--- a/EventLoop.cpp Mon Apr 18 12:59:37 2016 -0500 +++ b/EventLoop.cpp Mon Apr 18 13:22:21 2016 -0500 @@ -5,9 +5,10 @@ EventLoop::EventLoop(osPriority priority, unsigned event_count, unsigned event_context, + unsigned char *event_pointer, uint32_t stack_size, unsigned char *stack_pointer) - : EventQueue(event_count, event_context) { + : EventQueue(event_count, event_context, event_pointer) { _running = false; _priority = priority; _stack_size = stack_size; @@ -18,9 +19,10 @@ osPriority priority, unsigned event_count, unsigned event_context, + unsigned char *event_pointer, uint32_t stack_size, unsigned char *stack_pointer) - : EventQueue(event_count, event_context) { + : EventQueue(event_count, event_context, event_pointer) { _running = false; _priority = priority; _stack_size = stack_size;