Skip to content

Commit 3a5339c

Browse files
c42fKristofferC
authored andcommitted
Fix world age issue with custom streams for Distributed workers (JuliaLang/julia#42481)
If connect(::CustomClusterManager, ...) returns a custom transport stream, use of that stream by the task in start_gc_msgs_task() may fail due to the task executing in an old world age. Add an invokelatest() to prevent this problem. (cherry picked from commit 24afe90)
1 parent ecd3ed9 commit 3a5339c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/remotecall.jl

+4-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,10 @@ function start_gc_msgs_task()
270270
# this might miss events
271271
wait(any_gc_flag)
272272
end
273-
flush_gc_msgs() # handles throws internally
273+
# Use invokelatest() so that custom message transport streams
274+
# for workers can be defined in a newer world age than the Task
275+
# which runs the loop here.
276+
invokelatest(flush_gc_msgs) # handles throws internally
274277
end
275278
end
276279
)

0 commit comments

Comments
 (0)