File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,12 @@ CurrentModule = DistributedNext
77This documents notable changes in DistributedNext.jl. The format is based on
88[ Keep a Changelog] ( https://keepachangelog.com ) .
99
10+ ## Unreleased
11+
12+ ### Fixed
13+ - Backported various fixes from Distributed ([ #25 ] ).
14+ - Fixed a lingering task that could cause hangs when exiting Distributed ([ #51 ] ).
15+
1016## [ v1.1.0] - 2025-08-02
1117
1218### Fixed
Original file line number Diff line number Diff line change @@ -132,7 +132,10 @@ include("pmap.jl")
132132include (" managers.jl" ) # LocalManager and SSHManager
133133include (" precompile.jl" )
134134
135+ _stdlib_watcher_timer:: Union{Timer, Nothing} = nothing
136+
135137function __init__ ()
138+ global _stdlib_watcher_timer
136139 init_parallel ()
137140
138141 if ccall (:jl_generating_output , Cint, ()) == 0
@@ -141,20 +144,12 @@ function __init__()
141144 # cluster cookie has been set, which is most likely to have been done
142145 # through Distributed.init_multi() being called by Distributed.addprocs() or
143146 # something.
144- watcher_task = Threads . @spawn while true
147+ _stdlib_watcher_timer = Timer ( 0 ; interval = 1 ) do timer
145148 if _check_distributed_active ()
146- return
147- end
148-
149- try
150- sleep (1 )
151- catch
152- # sleep() may throw when the internal object it waits on is closed
153- # as the process exits.
154- return
149+ close (timer)
155150 end
156151 end
157- errormonitor (watcher_task )
152+ atexit (() -> close (_stdlib_watcher_timer) )
158153 end
159154end
160155
You can’t perform that action at this time.
0 commit comments