By using ThreadVar keyword, each thread is given a separate instance of each variable, thereby avoiding data conflicts, and preserving thread independence.
Also you do not need to protect your threadvar variables in critical sections, due to the fact that are local to the thread.
best regards,
Radu