Skip to content

Commit

Permalink
parallel docs updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mlubin committed May 16, 2013
1 parent 03bd8fe commit 7b8dec6
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 84 deletions.
6 changes: 3 additions & 3 deletions base/multi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1201,13 +1201,13 @@ function pmap(f, lsts...)
i = 1
# function to produce the next work item from the queue.
# in this case it's just an index.
next_idx() = (idx=i; i+=1; idx)
nextidx() = (idx=i; i+=1; idx)
@sync begin
for p=1:np
if p != myid() || np == 1
@spawnat myid() begin
@async begin
while true
idx = next_idx()
idx = nextidx()
if idx > n
break
end
Expand Down
Loading

0 comments on commit 7b8dec6

Please sign in to comment.