Multithreaded Apartment (MTA) Support for COM components

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

Message Queuing provides better support for applications that initialize their threads to reside in a single multithreaded apartment (MTA). In an MTA, calls to object methods can be run on any thread, and calls to any number of methods can be executed simultaneously.

  • Message Queuing has improved the performance of its COM objects by using an MTA. This model allows Message Queuing to execute object methods on the caller's thread. For MSMQ 1.0, Message Queuing executes methods only on the creator's thread. There is a thread switch from an MTA to an STA, causing a bottleneck in COM's STA. In MSMQ 1.0, the STA model served all MSMQ COM objects.

  • Message Queuing now has reduced call blocking. Because methods are executed on the caller's thread, any blocking call (such as a receive call with a long time-out period) will block only the caller's thread. For MSMQ 1.0, a single blocking call blocks the creator's thread, which in turn blocks all calls.

  • Applications that share Message Queuing objects perform faster because the caller thread manipulates the object. For MSMQ 1.0, all calls are switched to the creator's thread before they can be executed.

See Also

New Features for Windows 2000