News for hackers. Stuff that matters.
Re:The Downsides of C++ Coroutines by singron on Sunday August 13, 2023 @11:56AM (#37111094)
You have to be careful. Stackless coroutines will only schedule if you call co_await, but a stackful coroutine can be scheduled in the depths of any call.

This can trick 2 parts of your program into thinking they have exclusive access to the same thing at the same time. E.g. they could both grab the same thread local or both enter the critical section of a recursive mutex.

There are no comments on this comment yet.