Skip to main content

spawn_hook

Function spawn_hook 

Source
pub fn spawn_hook<F, Fut, E>(
    timeout: Duration,
    workspace_root: PathBuf,
    task_label: &'static str,
    fut_factory: F,
)
where F: FnOnce() -> Fut + Send + 'static, Fut: Future<Output = Result<(), E>> + Send + 'static, E: Display + Send + 'static,
Expand description

Spawn an async persistence task with the configured timeout.

The task’s result is never awaited by the caller. Errors and timeouts are logged at WARN; the query path is unaffected.

This helper is public so the production super::manager::WorkspaceManager and custom SqrydHook impls can share the same timeout-and-absorb pattern.