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

Method release

nodedb/src/control/planner/wasm/pool.rs:67–74  ·  view source on GitHub ↗

Return an instance to the pool after use.

(&self, tenant_id: u64, func_name: &str, instance: PooledInstance)

Source from the content-addressed store, hash-verified

65
66 /// Return an instance to the pool after use.
67 pub fn release(&self, tenant_id: u64, func_name: &str, instance: PooledInstance) {
68 let key = (tenant_id, func_name.to_string());
69 let mut pools = self.pools.lock().unwrap_or_else(|p| p.into_inner());
70 let pool = pools.entry(key).or_default();
71 if pool.len() < self.pool_size {
72 pool.push(instance);
73 }
74 }
75
76 /// Pre-warm the pool for a tenant+function.
77 pub fn warm(

Callers

nothing calls this directly

Calls 5

to_stringMethod · 0.80
lockMethod · 0.80
entryMethod · 0.80
lenMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected