If I have several coroutines suspended on a Mutex ...
# coroutines
m
If I have several coroutines suspended on a Mutex (they all lock from the same thread), will they resume in the same order as they tried to acquire the lock or is this undetermined ?
m
I wanted to know this too, is Mutex fair or not?
This function is fair; suspended callers are resumed in first-in-first-out order.
https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.sync/-mutex/lock.html
Now we know
m
Ah, perfect, thanks !