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

Method new

nodedb-mem/src/governor.rs:63–68  ·  view source on GitHub ↗
(limit: usize)

Source from the content-addressed store, hash-verified

61
62impl ScopedBudget {
63 fn new(limit: usize) -> Self {
64 Self {
65 limit,
66 allocated: Arc::new(AtomicUsize::new(0)),
67 }
68 }
69
70 /// Attempt a CAS-based reservation. Returns the `Arc` to the counter on
71 /// success so the token can hold a reference for drop-release.

Callers

nothing calls this directly

Calls 2

validateMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected