File tree 1 file changed +3
-8
lines changed
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -751,7 +751,6 @@ function redirect_output_from_additional_worker(pid, port)
751
751
end
752
752
753
753
function check_master_connect ()
754
- timeout = worker_timeout () * 1e9
755
754
# If we do not have at least process 1 connect to us within timeout
756
755
# we log an error and exit, unless we're running on valgrind
757
756
if ccall (:jl_running_on_valgrind ,Cint,()) != 0
@@ -760,13 +759,9 @@ function check_master_connect()
760
759
761
760
errormonitor (
762
761
Threads. @spawn begin
763
- start = time_ns ()
764
- while ! haskey (map_pid_wrkr, 1 ) && (time_ns () - start) < timeout
765
- sleep (1.0 )
766
- end
767
-
768
- if ! haskey (map_pid_wrkr, 1 )
769
- print (stderr , " Master process (id 1) could not connect within $(timeout/ 1e9 ) seconds.\n exiting.\n " )
762
+ timeout = worker_timeout ()
763
+ if timedwait (() -> ! haskey (map_pid_wrkr, 1 ), timeout) === :timed_out
764
+ print (stderr , " Master process (id 1) could not connect within $(timeout) seconds.\n exiting.\n " )
770
765
exit (1 )
771
766
end
772
767
end
You can’t perform that action at this time.
0 commit comments