Subject: Re: [boost] library to support async/await pattern
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2013-04-20 07:03:00
2013/4/20 Valentin Milea <valentin.milea_at_[hidden]>
> I've started looking over Boost.Task, impressive design! Some things are
> hard to tell because of incomplete code.
yes - I'm suffer to have enough time (I've to implemnet interface V2 to
coroutine, finalize fiber, refactor context for checkpointing ...)
> When run from a pool thread, boost::tasks::handle::get() / wait() don't
> block current thread. Instead they suspend current task until result
> becomes available. I assume each task has its own fcontext_t. Then wait()
> from a _fiber_ pool would behave like the proposed 'await'.
> I'm not sure how a boost::task wrapper would be implemented over Asio API.
> Run it as a subtask and trigger some condition variable in Asio callback?
I wasn't thinking about an asio wrapper - it might be require a new library
(maybe worth of investigation).
I supect that boost.task would fit here (as a wrapper for coop. operations
Also, I noticed a couple of missing features:
> - can't configure stack size per task
will be added - and for gcc the stack will grow on demand
> - no waitfor_any is quite a limitation
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk