[context] Release date?
Hey, boost.context has been accepted quite some time ago, is there any eta on when it is going be officially part of boost? asio (for async task running) + context (as a coroutine/continuation) == pure win -- Szymon Gatner The Lordz Games Studio www.thelordzgamesstudio.com
On Sat, Jul 14, 2012 at 6:16 AM, Szymon Gatner
boost.context has been accepted quite some time ago, is there any eta on when it is going be officially part of boost?
asio (for async task running) + context (as a coroutine/continuation) == pure win
Without disagreeing with the above, you might find that asio + coroutine is even more a win, as coroutine layers an application-level API on top of context: http://olk.bplaced.net/boost-coroutine.zip
Am 14.07.2012 13:06, schrieb Nat Linden:
On Sat, Jul 14, 2012 at 6:16 AM, Szymon Gatner
wrote: boost.context has been accepted quite some time ago, is there any eta on when it is going be officially part of boost?
asio (for async task running) + context (as a coroutine/continuation) == pure win Without disagreeing with the above, you might find that asio + coroutine is even more a win, as coroutine layers an application-level API on top of context: http://olk.bplaced.net/boost-coroutine.zip documentation (needs some enhancements, I know) at http://olk.bplaced.net/boost/libs/coroutine/doc/html/
As I worte in a previous posting - the example section contains code which integrates a coroutine inside a streambuf so that the stream using this streambuf can be used as usual (without blocking the application) inbuf ib( socket); istream is( & ib); std::string line; do { std::getline( line); ... } while ( line != "exit"); regards, Oliver
2012/7/14 Oliver Kowalke
Am 14.07.2012 13:06, schrieb Nat Linden:
On Sat, Jul 14, 2012 at 6:16 AM, Szymon Gatner
wrote: boost.context has been accepted quite some time ago, is there any eta on when it is going be officially part of boost?
asio (for async task running) + context (as a coroutine/continuation) == pure win
Without disagreeing with the above, you might find that asio + coroutine is even more a win, as coroutine layers an application-level API on top of context: http://olk.bplaced.net/boost-coroutine.zip
documentation (needs some enhancements, I know) at http://olk.bplaced.net/boost/libs/coroutine/doc/html/
Wow, that is indeed pretty great. Very happy to hear about 1.51 context release and will gladly participate in coroutine review. Both will simplify asynchronous code a lot. We now just need move semantics in asio and function libraries ;)
As I worte in a previous posting - the example section contains code which integrates a coroutine inside a streambuf so that the stream using this streambuf can be used as usual (without blocking the application)
inbuf ib( socket); istream is( & ib); std::string line; do { std::getline( line); ... } while ( line != "exit");
I can't seem to find that example section you mention in coroutine docs. Regards, Szymon Gatner
As I worte in a previous posting - the example section contains code which integrates a coroutine inside a streambuf so that the stream using this streambuf can be used as usual (without blocking the application)
inbuf ib( socket); istream is( & ib); std::string line; do { std::getline( line); ... } while ( line != "exit");
I can't seem to find that example section you mention in coroutine docs.
download the archive from http://olk.bplaced.net/boost-coroutine.zip - the streambuffer code can be found in directory libs/coroutine/examples/coroutine/asio/stream regards, Oliver
2012/7/17 Oliver Kowalke
I can't seem to find that example section you mention in coroutine docs.
download the archive from http://olk.bplaced.net/boost-coroutine.zip - the streambuffer code can be found in directory libs/coroutine/examples/coroutine/asio/stream
Thanks, got it! Pretty exciting stuff I must say. I discovered coroutines when first learned Lua and immediately wished I had them in my favorite language. That is one of things that makes it my favorite actually - I am using VC2008 so I am pretty much stuck in C++2003 and yet I just got new modern "language" tool at my disposal (shortly after move emulation, which coroutine also uses, which btw makes them possible to store in boost.containers. Suspended functions stored in a container. I mean if that is not awesome then what is). Thanks again. -- Szymon Gatner The Lordz Games Studio www.thelordzgamesstudio.com
Hello Szymon, boost.context will be released with boost-1.51 (unfortunately I was too late for bosot-1.50). boost.coroutine (based on boost.context) will be reviewed from 3.9.2012 - 12.09.2012 - I hope you will join the review. BTW: I've added two examples using boost.asio together with boost.coroutine - (for instance a socket-stream which will not block because of a coroutine) - the archive will be updated soon. regards, Oliver
Hey,
boost.context has been accepted quite some time ago, is there any eta on when it is going be officially part of boost?
asio (for async task running) + context (as a coroutine/continuation) == pure win
participants (3)
-
Nat Linden
-
Oliver Kowalke
-
Szymon Gatner