with_thread_buffer

Function with_thread_buffer 

Source
pub fn with_thread_buffer<F, R>(f: F) -> R
where F: FnOnce(&EventBuffer) -> R,
Expand description

Get reference to current thread’s event buffer

Used by allocator hooks to record allocation events. Safe because each thread has exclusive access to its own buffer.