Skip to main content

request_shutdown

Function request_shutdown 

Source
pub fn request_shutdown() -> Result<()>
Expand description

Request graceful shutdown from any async task. Request graceful shutdown of the worker event loop from any async task.

This is the free-function equivalent of ConnCtx::request_shutdown() — it can be called from standalone tasks or AsyncEventHandler::on_start() futures where no ConnCtx is available.

Returns Err if called outside the ringline async executor.