From b70ef5081b152f001da29de0d72afad76d7fe146 Mon Sep 17 00:00:00 2001 From: "Bradley C. Kuszmaul" Date: Thu, 13 Mar 2025 12:45:14 -0400 Subject: [PATCH 1/2] Don't use a symbol for the never-cached value, use a an internal singleton value --- src/MultiThreadedCaches.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/MultiThreadedCaches.jl b/src/MultiThreadedCaches.jl index 7cc7c08..714271f 100644 --- a/src/MultiThreadedCaches.jl +++ b/src/MultiThreadedCaches.jl @@ -118,7 +118,8 @@ function _thread_lock(cache::MultiThreadedCache, tid) end -const CACHE_MISS = :__MultiThreadedCaches_key_not_found__ +struct NeverCached end +const CACHE_MISS = NeverCached() 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. From f64284487d3fe8dc96e8bb3a8e6a39dd43f4c5eb Mon Sep 17 00:00:00 2001 From: Nick Robinson Date: Fri, 14 Mar 2025 10:11:06 +0000 Subject: [PATCH 2/2] Bump version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 8a18828..4cecf13 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.4" +version = "0.1.5" [compat] julia = "1.3"