Maybe we can just use ((i,j) for i in x for j in y) - it seems to be Iterator.Flatten. Please note we can’t use int with @threads cause it has no length.
EDIT: now I see that Reducers.jl require it too, I cannot make it work.
I should have mentioned in my post that the real problem has more than two dimensions, [x1, x2, x3, x4, ... , x20]. So the Iterators.product will be a convenient scalable solution for this case. I am going to try Transducers.jl once it supports the Iterators.product.
You can also loop over single dimension with @threads and then loop over product of remaining dimensions. Spawning more threads than cores will not make your program faster.