pub trait Access<A> { }
Expand description

Type system for enforcing the lock order on shared HUB structures. If type A implements Access<B>, that means we are allowed to proceed with locking resource B after we lock A.

The implementations basically describe the edges in a directed graph of lock transitions. As long as it doesn’t have loops, we can have multiple concurrent paths on this graph (from multiple threads) without deadlocks, i.e. there is always a path whose next resource is not locked by some other path, at any time.

Implementors