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" 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.