Skip to content

Commit 01aee02

Browse files
authored
Remove Base.Callable type restriction on func argument
Base.Callable doesn't actually mean everything that can be called. It's a union of Function and type. We don't need this restriction in our case.
1 parent c04123a commit 01aee02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MultiThreadedCaches.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ end
119119

120120
const CACHE_MISS = :__MultiThreadedCaches_key_not_found__
121121

122-
function Base.get!(func::Base.Callable, cache::MultiThreadedCache{K,V}, key) where {K,V}
122+
function Base.get!(func, cache::MultiThreadedCache{K,V}, key) where {K,V}
123123
# If the thread-local cache has the value, we can return immediately.
124124
# We store tcache in a local variable, so that even if the Task migrates Threads, we are
125125
# still operating on the same initial cache object.

0 commit comments

Comments
 (0)