Skip to content

Commit

Permalink
make at-sync thread safe (JuliaLang/julia#35641)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson authored May 4, 2020
1 parent db339ce commit 45ccf87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/macros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ macro spawn(expr)
quote
local ref = spawn_somewhere($thunk)
if $(Expr(:islocal, var))
push!($var, ref)
put!($var, ref)
end
ref
end
Expand Down Expand Up @@ -94,7 +94,7 @@ macro spawnat(p, expr)
quote
local ref = $spawncall
if $(Expr(:islocal, var))
push!($var, ref)
put!($var, ref)
end
ref
end
Expand Down Expand Up @@ -346,7 +346,7 @@ macro distributed(args...)
return quote
local ref = pfor($(make_pfor_body(var, body)), $(esc(r)))
if $(Expr(:islocal, syncvar))
push!($syncvar, ref)
put!($syncvar, ref)
end
ref
end
Expand Down

0 comments on commit 45ccf87

Please sign in to comment.