Skip to content

Commit

Permalink
Fix typo in handle cache lookup (JuliaGPU#2604)
Browse files Browse the repository at this point in the history
  • Loading branch information
jarbus authored and THargreaves committed Jan 7, 2025
1 parent 3ff1de0 commit bd6e4f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils/cache.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function Base.pop!(cache::HandleCache{K,V}, key::K) where {K,V}
if handle === nothing && num_active_handles > cache.max_entries
GC.gc(false)
@lock cache.lock begin
if haskey(cache.idle_handles, key) && isempty(cache.idle_handles[key])
if haskey(cache.idle_handles, key) && !isempty(cache.idle_handles[key])
handle = pop!(cache.idle_handles[key])
end
end
Expand Down

0 comments on commit bd6e4f9

Please sign in to comment.