Skip to content

Commit 2da966a

Browse files
authored
Fully qualify at-everywhere, fixes JuliaLang/julia#28966. (JuliaLang/julia#32144)
1 parent 7819368 commit 2da966a

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/macros.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Equivalent to calling `remotecall_eval(Main, procs, expr)`.
172172
"""
173173
macro everywhere(ex)
174174
procs = GlobalRef(@__MODULE__, :procs)
175-
return esc(:(@everywhere $procs() $ex))
175+
return esc(:($(Distributed).@everywhere $procs() $ex))
176176
end
177177

178178
macro everywhere(procs, ex)

test/distributed_exec.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,6 +1614,18 @@ for T in (UInt8, Int8, UInt16, Int16, UInt32, Int32, UInt64)
16141614
@test n == 55
16151615
end
16161616

1617+
# issue #28966
1618+
let code = """
1619+
import Distributed
1620+
Distributed.addprocs(1)
1621+
Distributed.@everywhere f() = myid()
1622+
for w in Distributed.workers()
1623+
@assert Distributed.remotecall_fetch(f, w) == w
1624+
end
1625+
"""
1626+
@test success(`$(Base.julia_cmd()) --startup-file=no -e $code`)
1627+
end
1628+
16171629
# Run topology tests last after removing all workers, since a given
16181630
# cluster at any time only supports a single topology.
16191631
rmprocs(workers())

0 commit comments

Comments
 (0)