MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / lock_read

Method lock_read

nodedb/src/control/security/rls/store.rs:32–36  ·  view source on GitHub ↗

Acquire a read lock, recovering from `RwLock` poisoning.

(
        &self,
    )

Source from the content-addressed store, hash-verified

30
31 /// Acquire a read lock, recovering from `RwLock` poisoning.
32 pub(super) fn lock_read(
33 &self,
34 ) -> std::sync::RwLockReadGuard<'_, HashMap<String, Vec<RlsPolicy>>> {
35 self.policies.read().unwrap_or_else(|p| p.into_inner())
36 }
37
38 /// Acquire a write lock, recovering from `RwLock` poisoning.
39 pub(super) fn lock_write(

Callers 6

read_policiesMethod · 0.80
write_policiesMethod · 0.80
list_all_flatMethod · 0.80
all_policiesMethod · 0.80
policy_existsMethod · 0.80

Calls 1

readMethod · 0.45

Tested by

no test coverage detected