Boost Context library

3.5k views Asked by At

In the most recent version of the Boost the new library Context appeared.

After reading the documentation I understood what it does, but can hardly see the use-cases. What are the benefits of using this library? For which tasks you could recommend to use it?

1

There are 1 answers

2
Jan Hudec On BEST ANSWER

It's a basis for coroutine library, that is under review as of early september 2012, so it should appear in some future release. That will allow easy implementation of things like generators like in python or C# have them.

The context library itself can be compared to scheme's call-with-current-continuation and call-with-dynamic-root functions. A basis for various kinds of coroutines, generators and cooperative threads.

Update: Coroutine library is included in Boost since version 1.53.