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)
777777end
778778
779779function check_master_connect ()
780- timeout = worker_timeout () * 1e9
781780 # If we do not have at least process 1 connect to us within timeout
782781 # we log an error and exit, unless we're running on valgrind
783782 if ccall (:jl_running_on_valgrind ,Cint,()) != 0
784783 return
785784 end
786785
787786 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 " )
796791 exit (1 )
797792 end
798793 end
You can’t perform that action at this time.
0 commit comments