What is the difference between STA and MTA?

Answer Posted / umarali

STA:

1.STA stands for Single Threaded Apartment
2.In STA,there may be multiple apartment.But only single
thread can be executed in a apartment.
3.In STA, if there is a need to communicate between threads
we need a proxy, they can not do it directly.
4.MTA applications execute slower than STA
5.If the COM object cannot handle its own synchronization
i.e not thread safe then the STA model can be used

MTA:

1.MTA stands for Multi Threaded Apartment
2.In MTA, only one apartment will be there and all threads
will execute within that single apartment.
3.In MTA, threads communicate directly to each other without
a proxy.
4.MTA applications typically execute faster than STA because
there is less system overhead and can be optimized to
eliminate system idle time.
5.If the COM object can handle its own synchronization then
the MTA model can be used

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between viewbag and viewdata in mvc?

537


Explain linq to entities? : Entity framework

542


What is storage model? : Entity framework

549


What is the importance of NonActionAttribute?

605


What is meant by domain model?

538






What is edm designer? : Entity framework

562


what is entity data model?

586


In .net compact framework, can we free memory explicitly without waiting for garbage collector to free the memory?

543


What is the use of the default route {resource}.axd/{*pathinfo} ?

551


What is .net architecture?

540


How we can add the css in mvc?

586


What is meant by bootstrap in mvc5?

635


How we can call a JavaScript function on the change of a Dropdown List in ASP.Net MVC?

557


Why to use '{resource}.axd/{*pathInfo}' in routing in ASP.Net MVC?

2054


I want to fetch data from datareader. i have three tables in datareader. i want to bind my two table with datagrid, then i want to fetch a value from my third table. do u have any idea pls help me. we use dr.nextresult() for multiple tables.

2165