MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / sender_for

Method sender_for

crates/openshell-server/src/sandbox_watch.rs:29–39  ·  view source on GitHub ↗
(&self, sandbox_id: &str)

Source from the content-addressed store, hash-verified

27 }
28
29 fn sender_for(&self, sandbox_id: &str) -> broadcast::Sender<()> {
30 let mut inner = self.inner.lock().expect("sandbox watch bus lock poisoned");
31 inner
32 .entry(sandbox_id.to_string())
33 .or_insert_with(|| {
34 // Small buffer; lag is handled best-effort by the stream.
35 let (tx, _rx) = broadcast::channel(128);
36 tx
37 })
38 .clone()
39 }
40
41 /// Notify watchers that the sandbox record has changed.
42 pub fn notify(&self, sandbox_id: &str) {

Callers 2

notifyMethod · 0.45
subscribeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected