Skip to main content

with_cache

Function with_cache 

Source
fn with_cache<R>(f: impl FnOnce(&[PciDevice]) -> R) -> R
Expand description

Populate the cache if empty, then run f on the device slice.

All query functions route through here so that only a single scan ever happens, and the lock is held for the duration of the filter : not for the entire boot.