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")
132
132
function __init__ ()
133
133
init_parallel ()
134
134
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 )
143
147
end
144
-
145
- sleep (1 )
148
+ errormonitor (watcher_task)
146
149
end
147
- errormonitor (watcher_task)
148
150
end
149
151
150
152
end
You can’t perform that action at this time.
0 commit comments