From d61b054118dd78ab2360cea310a0e0c42f710153 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 7 Aug 2017 11:46:56 -0400 Subject: [PATCH] fix scope issue with @-everywhere similar to other issues mentioned in #23146 --- base/distributed/macros.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base/distributed/macros.jl b/base/distributed/macros.jl index 0dc79e86b95b6..aa3f52cedc2d4 100644 --- a/base/distributed/macros.jl +++ b/base/distributed/macros.jl @@ -157,7 +157,8 @@ processes to have execute the expression. Equivalent to calling `remotecall_eval(Main, procs, expr)`. """ macro everywhere(ex) - return :(@everywhere procs() $ex) + procs = GlobalRef(@__MODULE__, :procs) + return esc(:(@everywhere $procs() $ex)) end macro everywhere(procs, ex)