File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -132,19 +132,21 @@ include("precompile.jl")
132132function __init__()
133133 init_parallel()
134134
135- # Start a task to watch for the Distributed stdlib being loaded and
136- # initialized to support multiple workers. We do this by checking if the
137- # cluster cookie has been set, which is most likely to have been done
138- # through Distributed.init_multi() being called by Distributed.addprocs() or
139- # something.
140- watcher_task = Threads. @spawn while true
141- if _check_distributed_active()
142- return
135+ if ccall(:jl_generating_output, Cint, ()) == 0
136+ # Start a task to watch for the Distributed stdlib being loaded and
137+ # initialized to support multiple workers. We do this by checking if the
138+ # cluster cookie has been set, which is most likely to have been done
139+ # through Distributed.init_multi() being called by Distributed.addprocs() or
140+ # something.
141+ watcher_task = Threads. @spawn while true
142+ if _check_distributed_active()
143+ return
144+ end
145+
146+ sleep(1 )
143147 end
144-
145- sleep(1 )
148+ errormonitor(watcher_task)
146149 end
147- errormonitor(watcher_task)
148150end
149151
150152end
You can’t perform that action at this time.
0 commit comments