Skip to content

Commit 9283e6f

Browse files
committed
fixup! Make worker state variable threadsafe
1 parent 9ed5776 commit 9283e6f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cluster.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -659,9 +659,9 @@ function create_worker(manager, wconfig)
659659
# require the value of config.connect_at which is set only upon connection completion
660660
for jw in PGRP.workers
661661
if (jw.id != 1) && (jw.id < w.id)
662-
# wait for wl to join
663-
if jw.state === W_CREATED
664-
lock(jw.c_state) do
662+
lock(jw.c_state) do
663+
# wait for wl to join
664+
if jw.state === W_CREATED
665665
wait(jw.c_state)
666666
end
667667
end

0 commit comments

Comments
 (0)