Function unprotected

Source
pub unsafe fn unprotected() -> UnprotectedGuard
Expand description

Returns a dummy guard object.

Calling protect on an unprotected guard will load the pointer directly, and retire will reclaim objects immediately.

Unprotected guards are useful when calling guarded functions on a data structure that has just been created or is about to be destroyed, because you know that no other thread holds a reference to it.

ยงSafety

You must ensure that code used with this guard is sound with the unprotected behavior described above.