Skip to content

Commit 96e0294

Browse files
committed
Use errormonitor() in a few places
1 parent d7f6faf commit 96e0294

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/cluster.jl

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -757,17 +757,20 @@ function check_master_connect()
757757
if ccall(:jl_running_on_valgrind,Cint,()) != 0
758758
return
759759
end
760-
@async begin
761-
start = time_ns()
762-
while !haskey(map_pid_wrkr, 1) && (time_ns() - start) < timeout
763-
sleep(1.0)
764-
end
765760

766-
if !haskey(map_pid_wrkr, 1)
767-
print(stderr, "Master process (id 1) could not connect within $(timeout/1e9) seconds.\nexiting.\n")
768-
exit(1)
761+
errormonitor(
762+
@async 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.\nexiting.\n")
770+
exit(1)
771+
end
769772
end
770-
end
773+
)
771774
end
772775

773776

0 commit comments

Comments
 (0)