-
Type: Task
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
It seems that Resource Mutexes are never released during a yield, this has the potential to lead to deadlocks as in the following case we would have one:
Thread A takes Lock A -> Lock B -> Resource Mutex A
Thread A yields
Thread B takes Lock B -> Waits until Resource Mutex A is available
Thread A wakes -> Lock A -> Wait until Lock B is available
Additionally it seems that the order of the locks taken is broken when storing in the LockSnapshot here. This is also unsafe, as it can cause deadlocks too as the order of locks when taken is potentially not the same after a yield and reacquiring them.