pub fn spawn_termination_signal_handler<F, Fut>(
shutdown_token: CancellationToken,
on_signal: F,
) -> JoinHandle<()>Expand description
Spawns a task that waits for a termination signal, cancels shutdown_token,
and then runs on_signal.
This keeps product entrypoints from duplicating the same signal-listener task while leaving the actual server stop primitive product-specific.