MCPcopy Create free account
hub / github.com/AI45Lab/Code / cancel_token_slot

Method cancel_token_slot

core/src/agent_api/runtime_events.rs:178–182  ·  view source on GitHub ↗

Share the per-run cancel-token slot. Used by stream worker state to observe cancellation when classifying a failed run.

(
        &self,
    )

Source from the content-addressed store, hash-verified

176 /// Share the per-run cancel-token slot. Used by stream worker state to
177 /// observe cancellation when classifying a failed run.
178 pub(super) fn cancel_token_slot(
179 &self,
180 ) -> Arc<tokio::sync::Mutex<Option<tokio_util::sync::CancellationToken>>> {
181 Arc::clone(&self.cancel_token)
182 }
183
184 pub(super) async fn clear_cancel_token(&self) {
185 *self.cancel_token.lock().await = None;

Callers 1

worker_stateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected