Capsule_expert.PasswordPasswords represent permission to get access to a capsule.
'k t is the type of "passwords" representing permission for the current thread to have uncontended access to the capsule 'k. They are only ever available locally, so cannot move between threads.
Obtaining a 'k t requires exclusive access to 'k, either through a 'k Key.t @ unique or indirectly through acquiring a mutex or rw-lock associated with 'k. The mode system prevents retaining the 'k t after releasing access to the capsule. This guarantees that uncontended access to the capsule is only granted to one thread at a time.
Shared passwords represent permission to get shared access to a capsule.
shared t downgrades a 'k password to a 'k shared password.