|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Per-thread-pool-thread data using ThreadPool classI am using the .NET framework's ThreadPool class for the first time. I have a good amount of experience with the ATL Server's templatized thread pool class (http://msdn2.microsoft.com/en-us/library/ 9tz6fz1e(VS.80).aspx). This implementation was very nice because you could create a class and pass it to the thread pool as a template parameter. Each worker thread that was added to the pool was an instance of this class. This flexibility allowed you to store instance data on a per-thread-pool-thread basis. This was very handy because you could initialize expensive objects when a new thread was being added to the pool and avoid the need to synchronize access to it when processing work items. Is there a similar way to do this w/ .NET's ThreadPool class? -- Regards, Travis Spencer |
|||||||||||||||||||||||