What are the limitations of a STA thread in compare to MTA threads ?

Posted by Xaqron on Stack Overflow See other posts from Stack Overflow or by Xaqron
Published on 2010-12-25T11:01:26Z Indexed on 2010/12/25 16:54 UTC
Read the original article Hit count: 287

Filed under:
|
|
|
|

If we make a thread STA like this: Thread.SetApartmentState(STA); then it cannot run code marked with [MTAThread] attribute.

We have seen [STAThread] in windows and console applications but I have never seen code with [MTAThread] attribute and don't know which .NET libraries use this attribute.

My question is what are the limitations of a thread with apartment state set to STA, in compare to threads with MTA apartment state (natural .NET threads) ?

© Stack Overflow or respective owner

Related posts about c#

Related posts about multithreading