We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0cb75f3 commit 04c8df2Copy full SHA for 04c8df2
base/regex.jl
@@ -40,8 +40,9 @@ mutable struct Regex <: AbstractPattern
40
re = compile(new(pattern, compile_options, match_options, C_NULL))
41
finalizer(re) do re
42
# don't free during exit because tasks may still be running and
43
- # using it. Issue #57817
44
- during_exit = Base._atexit_hooks_finished
+ # using it. Issue #57817. During sysimage creation _atexit_hooks_finished
+ # is not defined but threads aren't running so just always run
45
+ during_exit = @isdefined(_atexit_hooks_finished) && _atexit_hooks_finished
46
if re.regex != C_NULL && !during_exit
47
PCRE.free_re(re.regex)
48
end
0 commit comments