Function arti::reload_cfg::watch_for_config_changes

source ·
pub fn watch_for_config_changes<R: Runtime>(
    runtime: &R,
    sources: ConfigurationSources,
    config: &ArtiConfig,
    modules: Vec<Weak<dyn ReconfigurableModule>>
) -> Result<()>
Expand description

Launch a thread to reload our configuration files.

If current configuration requires it, watch for changes in sources and try to reload our configuration. On unix platforms, also watch for SIGHUP and reload configuration then.

The modules are Weak references to prevent this background task from keeping them alive.