Password.SharedShared passwords represent permission to get shared access to a capsule.
'k t is the type of "shared passwords" representing permission for the current thread to have shared access to the capsule 'k. They are only ever available locally, and so cannot move between threads.
Obtaining a 'k t requires a 'k Key.t @ aliased or read-acquiring the reader-writer lock associated with 'k.
A boxed version of Password.Shared.t for places where you need a type with layout value.
val borrow :
'a 'k. 'k t @ local ->
(('k t @ local -> 'a @ unique) @ local once ->
'a @ unique) @ local @@ portableborrow t f calls f with the shared password t upgraded to forkable. The function f is itself forkable, so cannot close over passwords. This allows the borrowed password to be safely closed over in parallel tasks, which receive temporary read-only access to the capsule.
Note f cannot return the password, as the result is global.