I do not understand what is going on here:
julia> test(i,j) = println("i = $i , j = $j")
i = 0
for j in 1:4
global i += 1
Threads.@spawn test(i,j)
end
i = 4 , j = 2
julia> i = 4 , j = 1
julia> i = 4 , j = 3
i = 4 , j = 4
Why I get the same i=4
value for all calls?