The Fuchsia guys use the trait system to enforce a global mutex locking order, which can statically prevent deadlocks due to two threads locking mutexes that they are both waiting for.
Doesn't help in this case, but it does suggest that we might be able to do better.
Doesn't help in this case, but it does suggest that we might be able to do better.