18 Dec
2018
18 Dec
'18
9:57 a.m.
On Mon, 17 Dec 2018 at 23:00, Damian Jarek
A currently running handler is considered work, so you don't need the second guard, because before the handler is dispatched, it's the timer's responsibility to maintain the guard for ctx2. After it calls `ctx.get_executor().dispatch()`, it will reset the guard, but the context will not stop until the handler is executed and returns.
OK. And the problem with my example is that my_executor::on_work_started() doesn't really count all the outstanding work since things like https://github.com/boostorg/asio/blob/a6008b6427ddfc3222f83c53030c34c802c53b... are invisible to it. Makes sense.