3 ms·
If two different threads were trying to lock different paths that entered the same cycle at different nodes, there can be a deadlock. X -> B B -> C C ->
by barrkel 15y ago
If two different threads were trying to lock different paths that entered the same cycle at different nodes, there can be a deadlock.
X -> B
B -> C
C -> B
Y -> C
Thread 1 tries to lock X B C; thread 2 tries to lock Y C B; deadlock with 1 holding X and B, 2 holding Y and C.
It's possible that your paths may be more restricted than this, but I reckon keeping the paths and cycles clean would be a bigger problem than recursive mutexes.