Accept the first Task to complete

Yes. If I provide an array of work items, I may want an array or stream of their results in the same order.

You can look a my examples in another thread to see what I mean. Essentially, creating lots of Tasks at once, whether child or unstructured, is really slow if you try to do it all at once (due to a lock on creation I think), but if you very slightly space them out, things run much faster. Also, the runtime doesn't seem to do any automatic work balancing of the enqueued tasks, so limiting your width can actually run faster with lower memory and thread usage.

2 Likes