3 ms·
Coroutines may also require mutexes. Usually they are very coarse-grained, but the usecases for coroutine mutexes and wait queues exist. These are not pthread m
by bonzini 9y ago
Coroutines may also require mutexes. Usually they are very coarse-grained, but the usecases for coroutine mutexes and wait queues exist. These are not pthread mutexes, of course, they would be part of the coroutine runtime or hand coded.
For example, you could have coroutines that write to a shared resource (such as a socket) where interleaving the data from two sources would be a problem.