Boost logo

Boost :

Subject: [boost] [fiber] Suggestions regarding asio
From: Tatsuyuki Ishi (ishitatsuyuki_at_[hidden])
Date: 2016-09-21 03:50:14


The current example seems non-flexible and very hacky.

1. The timer handler has no problem, since it's expected to be called from
any thread. (Description in "Deeper Dive into asio" is meaningless)
2. Possible alternatives:
* A post(empty lambda) is a little bit waste but solves the threading
problem. It wakes up one thread by doing interrupt of epoll etc. Maybe
adding a interrupt method to asio codebase could be more efficient.
* One thread doing event polling and the other doing condvar is enough.
Since we're not expecting a slow handler (most times, it just make a fiber
ready), this should be sufficient. Correct me if I'm wrong.


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