c/c++ coroutines with setcontext
james at mansionfamily.plus.com
Fri May 22 20:38:15 CEST 2009
Marc Lehmann wrote:
> Also, tying yourself to an unportable interface such as setcontext is
> probably not so good an idea (it doesn't work on many gnu/linux systems,
> I know of no BSd variant where ucontext works, most commercial unices have
> broken implementations, it has never been successfully standardised etc.).
Are you sure that the situation is that dismal?
Try also http://www.dekorte.com/projects/opensource/libcoroutine/
When I was looking for one of these things, it looked clean and
suggested reasonable portability. I
haven't given it a workout though.
There are other linked from http://en.wikipedia.org/wiki/Coroutine too.
More information about the libev