Thread Previous • Date Previous • Date Next • Thread Next |
On 08/12/2013 05:41 PM, Lorenzo Marcantonio wrote:
Initially, I though about using boost::coroutine, but almost got scared to death after seeing the example code. Finally I used boost::context + a small wrapper class.On Mon, Aug 12, 2013 at 10:58:31AM +0200, Tomasz Wlostowski wrote:Thanks :) I didn't want to impose any particular way of writing these FSMs, every programmers has his/her own taste, so he's free to choose between coroutines, state-as-method or simply a switch(state) {}.Do you know a good way for coroutines in C/C++? i.e. no setjmp/longjmp ugliness...
In kicad-gal-orson, there is a small example in include/tool/examples/coroutine_example.cpp.
Regards, Tom
Thread Previous • Date Previous • Date Next • Thread Next |