Can BackgroundWorker be Single Threaded Apartment?

H

Harry Keck

I have introduced a component to my solution that is throwing an exception
about needing to be run in single threaded apartment mode. This component is
created in an async call by a BackgroundWorker object, which seems to be on a
MTA thread. Is there a way for me to get the BackgroundWorker thread to run
in STA mode, or do I have to remove the BackgroundWorker and hand spin my own
async call?
 
R

Ralph

Harry Keck said:
I have introduced a component to my solution that is throwing an exception
about needing to be run in single threaded apartment mode. This component is
created in an async call by a BackgroundWorker object, which seems to be on a
MTA thread. Is there a way for me to get the BackgroundWorker thread to run
in STA mode, or do I have to remove the BackgroundWorker and hand spin my own
async call?

Which VB (classic or dotNet) are you using?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top