Skip to content

Commit 8092fbb

Browse files
refactor: avoid extra specialization in lock closure
1 parent 398e2f4 commit 8092fbb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/RuntimeGeneratedFunctions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function drop_expr(
113113
# When dropping the reference to the body from an RGF, we need to upgrade
114114
# from a weak to a strong reference in the cache to prevent the body being
115115
# GC'd.
116-
lock(_cache_lock) do
116+
@lock _cache_lock begin
117117
cache = getfield(parentmodule(cache_tag), _cachename)
118118
body = cache[id]
119119
if body isa WeakRef

0 commit comments

Comments
 (0)