Skip to content

Commit e6b658b

Browse files
Merge pull request #115 from AayushSabharwal/as/lock-closure
refactor: avoid extra specialization in `lock` closure
2 parents 398e2f4 + 8092fbb commit e6b658b

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)