@spawn map(x -> f(x), collection) only returns Task (Done)

I’ll often write a parallel map as something like

results = map(x -> @spawn foo(x), inputs) .|> fetch

So the map returns a collection of Tasks, which is then broadcasted into fetch to wait for and retrieve each of the results into a new collection.

1 Like