This is a dumb example, but I would like to learn a bit more about its syntax. I was expecting that adding @threads right in front of “for” would work out to make an array.
[f(x) @threads for x in 1:max_X]
[@threads f(x) for x in 1:max_X]
fetch.([Threads.@spawn f(i) for i in x]) usually does the trick for me. I don’t know if it will be the most performant but it’s good enough if i quickly want to parallelize something