oops, this is more complicated than I thought...I have to rethink on how we're supposed to drop the guards so that I could synchronize with the next Acquire....I'll share what I came up with after finding a solution thank you for pointing this out!
why do you think it should be UB, because you keep using the data after the lock has been released ?
it is not UB because the &Node in next is completely seperate from the *mut Node<T> it was created from, so it's fine to use after the lock has been closed, as long as you don't add any other code trying to do similar things in parralel.
ofc if you had other threads trying to do the same thing,then you could indeed get UB really quick
What if you use a single mutex for the entire list instead of one mutex per node, then a thread deleting a node just results in other threads blocking until the node is deleted.
If you lock a node and someone wants to delete the previous one, they shouldn't delete your Mutex. So, you probably want to transpose Mutex and pointer, for *mut Mutex<Node>... I don't remember if that would be enough to implement the list competely.