Skip to content

Commit 1cc177e

Browse files
committed
async bcast
1 parent 5adabf4 commit 1cc177e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ParallelOperations.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ function bcast(pids::Array, mod::Module = Main; args...)
9292
end
9393

9494
function bcast(pids::Array, f::Function, expr, mod::Module = Main; args...)
95-
for p in pids
96-
sendto(p, f, expr, mod; args...)
95+
@sync for p in pids
96+
@async sendto(p, f, expr, mod; args...)
9797
end
9898
end
9999

100100
function bcast(pids::Array, f::Function, mod::Module = Main; args...)
101-
for p in pids
102-
sendto(p, f, mod; args...)
101+
@sync for p in pids
102+
@async sendto(p, f, mod; args...)
103103
end
104104
end
105105

0 commit comments

Comments
 (0)