Hi All,
Just I want to know about single and multiple Apartment threading in detail. Then In DOTNET..how they have implemented free threading.
If any body has any article or code for each please let me know
Thanks in Advance
Satheesh
Printable View
Hi All,
Just I want to know about single and multiple Apartment threading in detail. Then In DOTNET..how they have implemented free threading.
If any body has any article or code for each please let me know
Thanks in Advance
Satheesh
Search MSDN with keyword: "apartment-model threading, in Visual Basic 6.0"
Regards,
TheBao
Hi
Got your reply. yaa I have seen the document what microsoft had given. But I want something more than that and that too very clear with some practical solution. If you find any documents or codes for it..let me know
Thanks for your reply
Satheesh
Here is what I found from one article:
If you want example, you can search at www.wrox.comQuote:
Single Thread:
If a component is marked as single threaded, then all methods of that component
will execute on the main thread. There is one main thread for each MTS application.
Since there is only one thread, it means that only one method can execute at any
given time. If there are multiple single threaded components that are being accessed
my multiple client simultaneouslym then it is easy to see why a bottleneck will
occur. Since only one method can execute at a time, all of the other methods will be
sitting around waiting their turn. This can essentially grind a system to a halt.
A good rule of thumb to remember is single threading = bad
Apartment Thread:
If a component is marked as apartment threaded, each method of that component will
execute on a thread that is associated with that component. Since each component
running inside MTS has its own thread, this separates the methods into their own
aparments, with each instance of a component corresponding to one apartment. While
there is only one thread inside of a component, each instance of that component will
have its own thread apartment. This will alleviate a great number of the problems
that a single threaded component has. Since multiple components can be executing
methods in their own apartments simultaneously, the scalability constraint that the
single threaded components have are greatly relaxed.
Regards,
TheBao
Hello Bao
Thats really interesting.
But I want more documents for object pooling using VB.NET. Really thanks a lot for this and I will check out www.wrox.com. If you want anything more please mail to [email protected]. Similary if you feel ok with me..give your yahoo ID.
Thanks Bao..,
Satheesh.