Ordering asynchronous updates with coroutines, part 5: Bowing out via cancellation

2 · Raymond Chen · Sept. 10, 2021, 2:21 p.m.
Last time, we showed how a coroutine could check after every co_await whether its work has been superseded, in which case it just gives up rather than proceeding with a calculation whose result won’t be used anyway. We noted that a coroutine provider can snoop on every co_await in the coroutine body by means of the await_transform method. The post Ordering asynchronous updates with coroutines, part 5: Bowing out via cancellation appeared first on The Old New Thing....