6 Aug
2009
6 Aug
'09
9:43 a.m.
I would advise against using hand-coded context switch under windows, unless you have *really* good knowledge of the internals of Windows' process model. Windows' process model is more complex than POSIX and proper context switch, as performed by the Fiber API, does few more things than just swapping the values of few registers. Using the Fibers API is safe(r) and CPU-independent.
Oh, don't let the name boost.fibers confuse you :) Internally it uses POSIX context switching under linux As for boost.coroutine being faster than boost.fibers, I wanted to say boost.coroutine uses very fast assembler snippet instead of heavy POSIX calls. -- Best regards, Pavel