Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lock around uv_unref during init #51236

Merged
merged 2 commits into from
Sep 9, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions base/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,9 @@ function __init__()
@static if !Sys.iswindows()
# triggering a profile via signals is not implemented on windows
cond = Base.AsyncCondition()
Base.iolock_begin() # uv_unref needs lock
Base.uv_unref(cond.handle)
Base.iolock_end()
PROFILE_PRINT_COND[] = cond
ccall(:jl_set_peek_cond, Cvoid, (Ptr{Cvoid},), PROFILE_PRINT_COND[].handle)
errormonitor(Threads.@spawn(profile_printing_listener()))
Expand Down