What's wrong with System.Threading.ThreadPool?

Saturday, February 7, 2004
There are some good responses to Rory's post with the above title.

I like the ThreadPool class because it simplifies spinning off worker tasks, but I did run into one area where I could not use it.

All the threads in the ThreadPool CoInitialize into an MTA. If you are doing COM interop with STA components (like any VB6 component), and want to avoid the marshalling overhead, there is no choice but to spin up your own thread with ApartmentState = ApartmentState.STA set before start.


Comments
Comments are now closed.
Follow Me On Twitter
RSS Subscribe
Contact
Search Archives
by K. Scott Allen
K.Scott Allen