Boost logo

Boost :

From: Daniel James (daniel_at_[hidden])
Date: 2005-06-03 03:40:35

Giovanni P. Deretta wrote:

> Speaking of more Boost centric stuff? There has been any proposal of a
> coroutine library? I think it should definitely be useful and not really
> that hard to implement (fibers on windows and makecontext or the
> setjump/sigaltstack trick on unices). Anyone interested?

IIRC there was an article in C++ user's journal which implemented
coroutines using fibres on windows and threads on unix. I'll have a look
for it later. Also there are these article on fibres (these are the 2nd
and 3rd parts, the first doesn't seem to be available):

Make sure you read the third part - it demonstrates that fibre-safety is
very different to thread safety (similar warning apply to coroutines in

I think setjump would also have some serious problems - you could only
have a single coroutine at a time and it could lead to undefined
behaviour in lots of nasty ways.


Boost list run by bdawes at, gregod at, cpdaniel at, john at