// unsafe because this is required to be externally synchronized
unsafe because this is required to be externally synchronized
unsafe because this is required to be externally synchronized
unsafe fn with_global(f: impl FnOnce(&mut Self)) {
        // A very small, very simple LRU cache for debug info mappings.
        //
        // The hit rate should be very high, since the typical stack doesn't cross
        // between many shared libraries.
        //
        // The `addr2line::Context` structures are pretty expensive to create. Its
        // cost is expected to be amortized by subsequent `locate` queries, which
        // leverage the structures built when constructing `addr2line::Context`s to
        // get nice speedups. If we didn't have this cache, that amortization would
        // never happen, and symbolicating backtraces would be ssssllllooooowwww.
        static mut MAPPINGS_CACHE: Option<Cache> = None;
        f(MAPPINGS_CACHE.get_or_insert_with(|| Cache::new()))
    }
unsafe fn with_global ( f : impl FnOnce ( & mut Self ) ) { // A very small, very simple LRU cache for debug info mappings. // // The hit rate should be very high, since the typical stack doesn't cross // between many shared libraries. // // The `addr2line::Context` structures are pretty expensive to create. Its // cost is expected to be amortized by subsequent `locate` queries, which // leverage the structures built when constructing `addr2line::Context`s to // get nice speedups. If we didn't have this cache, that amortization would // never happen, and symbolicating backtraces would be ssssllllooooowwww. static mut MAPPINGS_CACHE : Option < Cache > = None ; f ( MAPPINGS_CACHE . get_or_insert_with ( | | Cache :: new ( ) ) ) }
unsafe because this is required to be externally synchronized
unsafe because this is required to be externally synchronized
f
impl FnOnce(&mut Self)