Skip to content

Commit 7673ec1

Browse files
committed
Fix finally block bug
1 parent dd81cfe commit 7673ec1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ function lock(
207207
f()
208208
finally
209209
ok_flag = _is_locked(lf, lkid)
210-
_unlock(lf, lkid)
210+
ok_flag && _unlock(lf, lkid)
211211
end
212212

213213
return ok_flag

0 commit comments

Comments
 (0)