What are the types of threading models ?

Answer Posted / don

Single Threading: This is the simplest and most common threading
model where a single thread corresponds to your entire
application's
process.
Apartment Threading (STA): This allows multiple threads to
exist in a
single application. In single threading apartment (STA),
each thread
is isolated in it's own apartment. The process may contain
multiple
threads (apartments) however when an object is created in a
thread (i.e. apartment) it stays within that
apartment. If any communication needs to occur between different
threads (i.e. different apartments) then we must marshal the
first
thread object to the second thread.
Free Threading: The most complex threading model. Unlike STA,
threads are not confined to their own apartments. Multiple
treads can
make calls to the same methods and same components at the
same time.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is thread safe in c#?

568


What is the difference between internal and private in c#?

586


What is int tryparse in c#?

594


List the difference between the virtual method and the abstract method?

574


Will the following code compile and run?

646






What is the use of getcommandlineargs() method in c#.net?

610


What is base class in c#?

627


What is variable in c#?

614


What is xml comments in c#?

586


How to implement an object pool in c#.net.

658


What is difference between list and dictionary in c#?

546


Explain partial class in c#?

574


code for arranging given number in possible permutation ways ex:123,321,312,132,231,213.

1856


What do you mean by delegates and explain different types of delegates?

596


What is difference between for and foreach in c#?

538