File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -777,22 +777,17 @@ function redirect_output_from_additional_worker(pid, port)
777
777
end
778
778
779
779
function check_master_connect ()
780
- timeout = worker_timeout () * 1e9
781
780
# If we do not have at least process 1 connect to us within timeout
782
781
# we log an error and exit, unless we're running on valgrind
783
782
if ccall (:jl_running_on_valgrind ,Cint,()) != 0
784
783
return
785
784
end
786
785
787
786
errormonitor (
788
- @async begin
789
- start = time_ns ()
790
- while ! haskey (map_pid_wrkr, 1 ) && (time_ns () - start) < timeout
791
- sleep (1.0 )
792
- end
793
-
794
- if ! haskey (map_pid_wrkr, 1 )
795
- print (stderr , " Master process (id 1) could not connect within $(timeout/ 1e9 ) seconds.\n exiting.\n " )
787
+ Threads. @spawn begin
788
+ timeout = worker_timeout ()
789
+ if timedwait (() -> ! haskey (map_pid_wrkr, 1 ), timeout) === :timed_out
790
+ print (stderr , " Master process (id 1) could not connect within $(timeout) seconds.\n exiting.\n " )
796
791
exit (1 )
797
792
end
798
793
end
You can’t perform that action at this time.
0 commit comments