Skip to content

Commit

Permalink
Fix world age issue with custom streams for Distributed workers (Juli…
Browse files Browse the repository at this point in the history
…aLang#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.
  • Loading branch information
c42f authored and LilithHafner committed Mar 8, 2022
1 parent b1420b5 commit 4833dcf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion stdlib/Distributed/src/remotecall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,10 @@ function start_gc_msgs_task()
# this might miss events
wait(any_gc_flag)
end
flush_gc_msgs() # handles throws internally
# Use invokelatest() so that custom message transport streams
# for workers can be defined in a newer world age than the Task
# which runs the loop here.
invokelatest(flush_gc_msgs) # handles throws internally
end
end
)
Expand Down

0 comments on commit 4833dcf

Please sign in to comment.