ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories >> Software >> Microsoft-Related >> Dot-Net >> Dot-Net-Framework
 
 
 
Question
What is the difference between STA and MTA?
 Question Submitted By :: Swapna
I also faced this Question!!     Rank Answer Posted By  
 
Answer
In single threaded apartment (STA) each thread is isolated 
in a separate apartment underneath the process. The process 
can have any number of apartments that share data through a 
proxy. The application defines when and for how long the 
thread in each apartment should execute. All requests are 
serialized through the Windows message queue such that only 
a single apartment is accessed at a time and thus only a 
single thread will be executing at any one time. STA is the 
threading model that most Visual Basic developers are 
familiar with because this is the threading model available 
to VB applications prior to VB.NET. You can think of it 
like an apartment building full of a row of one room 
apartments that are accessible one at a time through a 
single hallway. The advantage this provides over single 
threaded is that multiple commands can be issued at one 
time instead of just a single command, but the commands are 
still sequentially executed.


The free threaded/Multi Threaded Apartment (MTA) model has 
a single apartment created underneath the process rather 
than multiple apartments. This single apartment holds 
multiple threads rather than just a single thread. No 
message queue is required because all of the threads are a 
part of the same apartment and can share data without a 
proxy. You can think of it like a building with multiple 
rooms that are all accessible once you are inside the 
building. These applications typically execute faster than 
single threaded and STA because there is less system 
overhead and can be optimized to eliminate system idle 
time.
 
0
Prabhu
 
View All Answers
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com