Skip to content

Commit deaeaf5

Browse files
committed
Catch exception thrown from sleep() in the Distributed watcher
Otherwise the exception would be printed when the process exits.
1 parent 135f5bd commit deaeaf5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/DistributedNext.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,13 @@ function __init__()
142142
return
143143
end
144144

145-
sleep(1)
145+
try
146+
sleep(1)
147+
catch
148+
# sleep() may throw when the internal object it waits on is closed
149+
# as the process exits.
150+
return
151+
end
146152
end
147153
errormonitor(watcher_task)
148154
end

0 commit comments

Comments
 (0)