EDIT
I solved my problem by using a single mutex variable in the Shared struct instead of the multiple mutexes in Unique. If someone understands why this works and the other one doesn't (reliably) I will gladly accept an answer. I solved my problem by using a single mute