I don't understand why they used a wasteful threaded model instead of an event reactor. It makes no sense to me on a constrained embedded platform. The right way to do it is Japaric's "Real-Time Interrupt-driven Concurrency". Only works for ARM cores though...