I have run into this problem.
I have (at least) 6 coroutines which works on a map which is managed through a mutex.
Sometimes I need to cancel one, more or all the coroutines in different scenarios.
What is the best way to cope with the mutex when cancelling the coroutine(s) ? (The fact is that I really don't know if the cancelling coroutine was the one which locked the mutex). Do the mutex "system" has any neat trick to cope with this ?
0 Replies