Note! This project has moved to github.com/armmbed/mbed-events

Dependents:   SimpleHTTPExample

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.

Revision:
5:9963a617f952
Parent:
2:11cda6bead99
Child:
6:31c141d3bcc7
--- a/EventQueue.cpp	Sun Apr 17 23:50:50 2016 -0500
+++ b/EventQueue.cpp	Wed Apr 20 22:28:19 2016 -0500
@@ -3,6 +3,7 @@
 
 
 EventQueue::EventQueue() {
+    _queue = 0;
     _tick = 0;
     _timer.start();
     _ticker.attach_us(this, &EventQueue::tick, (1 << 16) * 1000);