>
>
> i = 1
>> @sync @parallel for i in  i:i+stride
>>       dowork(i)
>>      i += 1
>> end
>>
>
Also, don't assume this kind of trick would work in general (i = 
i:i+stride). Here this is working because you declared i in the global 
scope (before entering the loop). But if you didn't, you would get:
julia> for k in 1:3
       println(k)
       end
1
2
3

julia> k
ERROR: k not defined

By the way, I'm not sure that global scope i should be actually modified by 
in-scope i. But changing that behavior might be tricky or not wanted. 

Reply via email to