What is STA in .NET?

Showing Answers 1 - 4 of 4 Answers

Pallavi

  • Oct 18th, 2006
 

STA is Store Accumulator

  Was this answer useful?  Yes

girija

  • Oct 23rd, 2006
 

please explain it .

  Was this answer useful?  Yes

satnam singh

  • Oct 23rd, 2006
 

single-threaded apartments (the apartment model process) offers a message-based paradigm for dealing with multiple objects running concurrently. It enables you to write more efficient code by allowing a thread, while it waits for some time-consuming operation to complete, to allow another thread to be executed.Each thread in a process that is initialized as an apartment model process, and that retrieves and dispatches window messages, is a single-threaded apartment thread. Each thread lives within its own apartment. Within an apartment, interface pointers can be passed without marshaling, and therefore, all objects in one single-threaded apartment thread communicate directly. A logical grouping of related objects that all execute on the same thread, and therefore must have synchronous execution, could live on the same single-threaded apartment thread. However, an apartment model object cannot reside on more than one thread. Calls to objects in other processes must be made within the context of the owning process, so distributed COM switches threads for you automatically when you call on a proxy.

  Was this answer useful?  Yes

raghavendran

  • Feb 28th, 2007
 

STA -Single Thread Apartment which means the windows contolls will be ruuning in thread that will be started on initalization.When another thread tries to access the contols then it is not possible. Cross theread communication is not supported. Delegates has to be used.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.