Skip to content

Commit 3e1638a

Browse files
committed
Don't use a symbol for the never-cached value, use a an internal singleton value
1 parent a0ed383 commit 3e1638a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/MultiThreadedCaches.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ function _thread_lock(cache::MultiThreadedCache, tid)
118118
end
119119

120120

121-
const CACHE_MISS = :__MultiThreadedCaches_key_not_found__
121+
struct NeverCached end
122+
const CACHE_MISS = NeverCached()
122123

123124
function Base.get!(func::Base.Callable, cache::MultiThreadedCache{K,V}, key) where {K,V}
124125
# If the thread-local cache has the value, we can return immediately.

0 commit comments

Comments
 (0)