MCPcopy Create free account
hub / github.com/base/base / interrupted

Method interrupted

acceptance/src/runner.rs:530–545  ·  view source on GitHub ↗

Waits for Ctrl-C or termination; cleanup remains outside the cancelled future.

()

Source from the content-addressed store, hash-verified

528
529 /// Waits for Ctrl-C or termination; cleanup remains outside the cancelled future.
530 pub async fn interrupted() {
531 #[cfg(unix)]
532 {
533 if let Ok(mut terminate) =
534 tokio::signal::unix::signal(tokio::signal::unix::SignalKind::terminate())
535 {
536 tokio::select! { _ = tokio::signal::ctrl_c() => {}, _ = terminate.recv() => {} }
537 } else {
538 let _ = tokio::signal::ctrl_c().await;
539 }
540 }
541 #[cfg(not(unix))]
542 {
543 let _ = tokio::signal::ctrl_c().await;
544 }
545 }
546}
547
548#[cfg(test)]

Callers

nothing calls this directly

Calls 1

signalFunction · 0.50

Tested by

no test coverage detected