Skip to content

Commit

Permalink
Fully qualify at-everywhere, fixes #28966.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed May 25, 2019
1 parent e39f498 commit b36f72c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/Distributed/src/macros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Equivalent to calling `remotecall_eval(Main, procs, expr)`.
"""
macro everywhere(ex)
procs = GlobalRef(@__MODULE__, :procs)
return esc(:(@everywhere $procs() $ex))
return esc(:($(Distributed).@everywhere $procs() $ex))
end

macro everywhere(procs, ex)
Expand Down
11 changes: 11 additions & 0 deletions stdlib/Distributed/test/distributed_exec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,17 @@ for T in (UInt8, Int8, UInt16, Int16, UInt32, Int32, UInt64)
@test n == 55
end

# issue #28966
let code = """
import Distributed
Distributed.@everywhere f() = myid()
for w in Distributed.workers()
@assert Distributed.remotecall_fetch(f, w) == w
end
"""
@test success(`$(Base.julia_cmd()) --startup-file=no -p1 -e $code`)
end

# Run topology tests last after removing all workers, since a given
# cluster at any time only supports a single topology.
rmprocs(workers())
Expand Down

0 comments on commit b36f72c

Please sign in to comment.