Skip to main content

spawn_reload_task

Function spawn_reload_task 

Source
pub fn spawn_reload_task(
    path: PathBuf,
    snapshot: Arc<HookConfigSnapshot>,
) -> JoinHandle<()>
Expand description

Spawn a tokio task that listens for SIGHUP and reloads path into snapshot on every signal.

G1 ships the signal-handler plumbing; the hooks loaded into the snapshot become live as soon as G3’s executor starts reading from it. Until then this is a no-op observable only via a tracing::info! log line per reload — exactly what the G1 epic doc calls for (“for now just load + emit a tracing info on reload”).

Returns the tokio::task::JoinHandle so the daemon main loop can shut the task down on graceful exit.