From 03586fba27491060cc595a64cf9a3f618c884ace Mon Sep 17 00:00:00 2001 From: "Bradley C. Kuszmaul" Date: Wed, 22 Jan 2025 10:20:33 -0500 Subject: [PATCH] Specify that the first argument to `get(func, ::MultiThreadedCache, key)` is a `Base.Callable`. Thus avoiding Aqua ambiguities with `get(t::AbstractDict, key, default)`. Increment the minor version number. --- Project.toml | 2 +- src/MultiThreadedCaches.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index c364489..8a18828 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MultiThreadedCaches" uuid = "18056a9e-ed0c-4ef3-9ad7-376a7fb08032" authors = ["Nathan Daly and contributors"] -version = "0.1.3" +version = "0.1.4" [compat] julia = "1.3" diff --git a/src/MultiThreadedCaches.jl b/src/MultiThreadedCaches.jl index 2e7fa93..7cc7c08 100644 --- a/src/MultiThreadedCaches.jl +++ b/src/MultiThreadedCaches.jl @@ -120,7 +120,7 @@ end const CACHE_MISS = :__MultiThreadedCaches_key_not_found__ -function Base.get!(func, cache::MultiThreadedCache{K,V}, key) where {K,V} +function Base.get!(func::Base.Callable, cache::MultiThreadedCache{K,V}, key) where {K,V} # If the thread-local cache has the value, we can return immediately. # We store tcache in a local variable, so that even if the Task migrates Threads, we are # still operating on the same initial cache object.