emilib
Classes
emilib::cr Namespace Reference

Classes

class  Coroutine
 This acts like a coroutine, but is implemented as a separate thread. More...
 
class  CoroutineSet
 Helper for handling several coroutines. More...
 
class  InnerControl
 
More...
 

Detailed Description

Coroutine-ish feature implemented using a thread. Useful for implementing a script of some sort where a state-machine would be cumbersome. The coroutine (inner) thread is executed only when the owning (outer) thread is paused, and vice versa.

The coroutine has helper functions for waiting for a certain amount of time etc. To keep track of the time, a time delta must be supplied when polling a coroutine. This allows the library user to for instance slow down time by supplying smaller time deltas then the wall clock time.

Example usage can be found in examples/ folder.