Are the internal delegate elements in the thread of the parallel task library safe - i.e. is the value of the variable declared inside this delegate allocated for this thread?
Example:
Parallel.ForEach(collection, item => {
var something = new Something(item.Property);
});
Is it somethingguaranteed to always be unique to a thread, protected from being overwritten by another thread created by the same operation Parallel?
source
share