Function metrics::set_recorder_racy

source ·
pub unsafe fn set_recorder_racy(
    recorder: &'static dyn Recorder
) -> Result<(), SetRecorderError>
Expand description

A thread-unsafe version of set_recorder.

This function is available on all platforms, even those that do not have support for atomics that are needed by set_recorder.

In almost all cases, set_recorder should be preferred.

Safety

This function is only safe to call when no other metrics initialization function is called while this function still executes.

This can be upheld by (for example) making sure that there are no other threads, and (on embedded) that interrupts are disabled.

It is safe to use other metrics functions while this function runs (including all metrics macros).