Well, internally BackgroundWorker uses BeginInvoke , which means (I believe) that it uses one of the threads from ThreadPool . As for if TLS is cleared when threads return to the pool, I cannot say for sure.
In response to the editing, nothing I saw in Reflector says that the TLS slots are cleared or freed after returning to the pool. Therefore, you must explicitly clear them before the DoWork method DoWork .
Sean Bright Feb 18 '09 at 15:36 2009-02-18 15:36
source share