Results 1 to 5 of 5

Thread: Apartment Model Threading

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Posts
    22

    Apartment Model Threading

    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

  2. #2
    Fanatic Member
    Join Date
    Jan 2001
    Location
    Vietnam
    Posts
    613
    Search MSDN with keyword: "apartment-model threading, in Visual Basic 6.0"

    Regards,
    TheBao

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Posts
    22
    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

  4. #4
    Fanatic Member
    Join Date
    Jan 2001
    Location
    Vietnam
    Posts
    613
    Here is what I found from one article:
    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.
    If you want example, you can search at www.wrox.com

    Regards,
    TheBao

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Posts
    22

    Hi

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width