Function sapiens::wrap_observer

source ·
pub fn wrap_observer<O: RuntimeObserver + 'static>(
    observer: O
) -> StrongRuntimeObserver<O>
Expand description

Wrap an observer into the a StrongRuntimeObserver<O> = Arc<Mutex<O>>

Use Arc::downgrade to get a Weak<Mutex<dyn RuntimeObserver>> and pass it to run_to_the_end for example.