Skip to main content

take_pool

Function take_pool 

Source
fn take_pool<T>(
    prev: Arc<T>,
    pool_of: impl Fn(&T) -> &DirPathsPool,
) -> DirPathsPool
where DirPathsPool: From<T>,
Expand description

Reuse the previous memo’s allocations when the cache slot held the only Arc (the common case — no in-flight query still reads it), clone otherwise.