Function horde::collect::pin[][src]

pub fn pin<R>(f: impl FnOnce(Pin<'_>) -> R) -> R

Marks the current thread as pinned and returns a proof of that to the closure.

This adds the current thread to the set of threads that needs to regularly call collect before memory can be freed. release can be called if a thread no longer needs access to lock-free data structures for an extended period of time.