You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think in general, threaded for-loops don't work on non-indexible collections. This happens in Base as well:
# This works because you can index into a Range object
Base.Threads.@threadsfor p ∈1:4println(p)
end# This throws the same TaskFailedException as in your example
Base.Threads.@threadsfor p ∈ Iterators.product(1:2, 1:2)
println(p)
end
Combinatorics.permutations creates an iterator that tracks state through a vector of Ints, and so it doesn't use linear indexing, which is probably what the @threads macro expects:
iterators like
pemutations
do not support @threadsERROR: TaskFailedException
...and 5 more exceptions.
The text was updated successfully, but these errors were encountered: