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: EventQueue.cpp
- Revision:
- 10:62767e708bb6
- Parent:
- 9:2b0910397844
- Child:
- 14:5abf2ccf2dbf
--- a/EventQueue.cpp Fri Apr 22 02:21:25 2016 -0500 +++ b/EventQueue.cpp Fri Apr 22 02:59:41 2016 -0500 @@ -1,5 +1,6 @@ #include "EventQueue.h" #include "Event.h" +#include "mbed.h" #ifndef EVENTS_NO_RTOS #include "rtos.h" @@ -27,7 +28,7 @@ } void EventQueue::dispatch(int ms) { - mbed::Timeout timeout; + Timeout timeout; struct event exit; if (ms >= 0) {