Subject: Re: [boost] [context] 4 days left on Boost.Context mini-review
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2012-01-09 02:20:08
> I looked over the documentation of this library. My question is: what is
> the relationship between this library and your coroutine library.
> Would this be a lower level component of the coroutine library.
boost.context is intended to work as the base for libraries like boost.coroutine.
It implements the context switching facility via assembler and provides a low level API (C-like) and a more comfortable context class (accepts functors).
The reason for implementing boost.context was, that the ucontext API on UNIX systems is dropped by the POSIX standard (boost.coroutine used ucontext API). For instance the standard glibc doesn't implements ucontext API on ARM.
Windows provides the Fiber API - I read some rumors that MS plans to dropp this API in the future (in a book from a MS lead developer). The Fiber API has some drawbacks like the user can't use/reuse its own stack (Fiber API allocates/deallocates the stack by itself).
With boost.context the developers should become a lib which is avaliable on most platforms (I think on the problems the LUA and FACTOR developers have had with this stuff).
The docu contains a section 'Rational' where is discuss in short ucontext and MS Fiber API (beside of longjump/setjump).
> Downloading from the git repo - clicking on the link - in the
> documentation didn't work for me.
Because your fiber doen't know protocol git.
On the console you can just type in:
git clone git://github.com/olk/boost.context.git
> Is there alternative way to get the source to have
GitHub website: http://github.com/olk/boost.context
zip from GitHub: http://github.com/olk/boost.context/zipball/master
> I was curious to know whether there is a good reason for not making
> it header only.
because the lib contains assembler :)
-- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk