Boost logo

Boost :

Subject: [boost] [asio] condition_variable for coroutine-powered ASIO
From: TONGARI J (tongari95_at_[hidden])
Date: 2013-07-28 09:11:41


Hi,

Since Boost 1.54, ASIO introduced yield_context, which is very helpful to
alleviate the pain of writing async ops.
Unlike multi-threading, with cooperative multi-tasking, generally we don't
have to worry about synchronization, but
we still need some sort of mechanism to sync the coroutines in cases like
producer-consumer for waiting the data...

While I haven't seen any sync tool for asio/coroutine, having
a condition_variable or such may be very useful, what do you think?

Attached is the poor-man's implementation...




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk