Boost logo

Boost Users :

Subject: Re: [Boost-users] [coroutine] Stack corruption?
From: Pavel Shevaev (pacha.shevaev_at_[hidden])
Date: 2009-08-06 05:43:12


> 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

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net