what is the best way to store some variable local to each thread?
If you use .Net 4.0 or above, as far as I know, the recommended way is to use System.Threading.ThreadLocal which also gives lazy initialization as a bonus.