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

Function try_record_activity

crates/openshell-core/src/activity.rs:36–38  ·  view source on GitHub ↗

Non-blocking emit. Drops the event if the queue is full. Returns whether the event was enqueued.

(tx: &ActivitySender, denied: bool, deny_group: &'static str)

Source from the content-addressed store, hash-verified

34/// Non-blocking emit. Drops the event if the queue is full.
35/// Returns whether the event was enqueued.
36pub fn try_record_activity(tx: &ActivitySender, denied: bool, deny_group: &'static str) -> bool {
37 tx.try_send(ActivityEvent { denied, deny_group }).is_ok()
38}
39
40#[cfg(test)]
41mod tests {

Callers 4

emit_activityFunction · 0.85
emit_activity_simpleFunction · 0.85
emit_activityFunction · 0.85
spawnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected