You need to isolate thread local data for each concurrent threads.
First of all read about
TLS Thread Local Storage[
^], then figure out how to use them in your project.
For samples read
this[
^], or google for "C# thread local storage example".
The Parallel.For Method exist also in a flavour with thread local storage.
See[
^].