👩💻 Join our community of thousands of amazing developers!
So far, we’ve been looking at the horrible things that can happen if you hold a lock across a coroutine suspension point. What can we do to avoid the problem? For reference, here’s the code in question: IAsyncAction MyObject::RunOneAsync() { std::lock_guard guard(m_mutex); The post On the perils of holding a lock across a coroutine suspension point, part 3: Solutions appeared first on The Old New Thing....