On Thu, 6 Dec 2018 at 23:59, Damian Jarek
Here's an example of what might happen if a composed operation doesn't maintain work guards properly: https://wandbox.org/permlink/aqsGDNJWTmFd7PdC
Without the work_guard the coroutine never completes. If you add the work_guard, everything works correctly.
If I were to do something stupid like https://wandbox.org/permlink/sIpX20mQdaHgjESz - Hide executor_type making it private - Use the handler executor type for the work guard What would be the best way to unit test async_foo() to detect the problems? I guess I could derive from io_context to get the steady_timer to use an intermediate executor that would forward everything to the io_context::get_executor but keeping record of the work count, and bind a similar fake executor to check the dispatch calls. But there may be a more clever/simpler way?