AsyncEnumerable icon indicating copy to clipboard operation
AsyncEnumerable copied to clipboard

Race condition in ParallelForEachAsync when exceptions are thrown

Open danylofitel opened this issue 5 years ago • 0 comments

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.

danylofitel avatar Apr 21 '20 00:04 danylofitel