A subtle way your await_suspend can access the coroutine frame when it shouldn’t

1 · Raymond Chen · May 7, 2021, 2:24 p.m.
As we learned in the very start of the series on coroutines, the await_suspend method cannot access the coroutine frame once it arranges for the coroutine to resume because that creates a race condition where the coroutine might already be resumed and possibly even run to completion before await_suspend finishes. The post A subtle way your await_suspend can access the coroutine frame when it shouldn’t appeared first on The Old New Thing....