AsyncEnumerable
AsyncEnumerable copied to clipboard
Race condition in ParallelForEachAsync when exceptions are thrown
Not resetting exception list to null in ReadExceptions, so that in case multiple tasks are finishing at the same time they will all read a non-empty list of exceptions.
Returning a copy of exception list from ReadExceptions to prevent concurrent reads by CompleteLoopNow and writes by tasks still running in case the loop was canceled.