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

Method sender_for

crates/openshell-server/src/tracing_bus.rs:62–72  ·  view source on GitHub ↗
(&self, sandbox_id: &str)

Source from the content-addressed store, hash-verified

60 }
61
62 fn sender_for(&self, sandbox_id: &str) -> broadcast::Sender<SandboxStreamEvent> {
63 let mut inner = self.inner.lock().expect("tracing bus lock poisoned");
64 inner
65 .per_id
66 .entry(sandbox_id.to_string())
67 .or_insert_with(|| {
68 let (tx, _rx) = broadcast::channel(1024);
69 tx
70 })
71 .clone()
72 }
73
74 pub fn subscribe(&self, sandbox_id: &str) -> broadcast::Receiver<SandboxStreamEvent> {
75 self.sender_for(sandbox_id).subscribe()

Callers 2

subscribeMethod · 0.45
publishMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected