Skip to content

Commit

Permalink
fixup! improve performance of disabling finalizers in locks
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Jan 23, 2021
1 parent 20f67bb commit 0462e38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/lock.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function lock(rl::ReentrantLock)
if rl.reentrancy_cnt == 0
rl.locked_by = t
rl.reentrancy_cnt = 1
GC.enable_finalizers()
GC.disable_finalizers()
break
elseif t === notnothing(rl.locked_by)
rl.reentrancy_cnt += 1
Expand Down

0 comments on commit 0462e38

Please sign in to comment.