TSan reports a ordering inversion because m1->m2 may deadlock with m2->m3 + m3->m1 from the second thread.
However this can't really happen because the two later connections cannot happen concurrently, since they come from the same thread of execution.
I suspect the same reasoning for #814 may apply here such that it doesn't look like good code. But while I agree it may not be the greatest code, it would be much more valuable to fix the more concerning violation first - but it's hard to find them among these "false" ones.
I'm starting to use the Thread Sanitizer and debugged a few issues that turned out to be false. It's somewhat related to #814 but not quite the same:
TSan reports a ordering inversion because
m1->m2
may deadlock withm2->m3
+m3->m1
from the second thread. However this can't really happen because the two later connections cannot happen concurrently, since they come from the same thread of execution.I suspect the same reasoning for #814 may apply here such that it doesn't look like good code. But while I agree it may not be the greatest code, it would be much more valuable to fix the more concerning violation first - but it's hard to find them among these "false" ones.