pub fn with_global_cache<F, R>(closure: F) -> Rwhere
F: FnOnce(&GlobalSampleCache) -> R,Expand description
Executes a closure with a reference to the global sample cache. This pattern is used to safely access thread-local storage without returning a reference that could outlive the scope of the thread-local data.