Skip to main content

try_shutdown

Function try_shutdown 

Source
pub async fn try_shutdown() -> bool
Available on crate feature global_instance only.
Expand description

Attempts to notify a shutdown on the global controller.

Returns true if the notify succeeded, false if already notified.

Equivalent to calling SoftCycleController::try_notify(SoftCycleMessage::Shutdown) on the global instance.