scoped_task

Function install_hooks

Source
pub fn install_hooks()
Expand description

Installs the hooks that ensure scoped tasks are cleaned up on panic and process exit.

Programs and tests that are multithreaded should call this before starting any threads. Single-threaded programs do not have to call this, and can rely on hooks being installed lazily.

This function can be called multiple times. It will not have any effect after the first call.