Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Apartment model threading question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01071330
Message ID:
01071664
Vues:
22
I don't understand the rule regarding how many concurrently existing objects can be created on the same thread. I do understand that once a COM object is created on a thread in the STA model, it lives its entire lifetime on that thread.

To keep the "ducks" in a row, there is: SYS(2336,1)/SYS(2336,2). A Calvin Hsia paper (Session: DNA08 - "Advanced Visual FoxPro Servers") offers a great description of VFP MTDLL. I'll look for a clean link - the one I just saw had formatting characters in the body.

The SYS(2336) functions control the flow. I am new to VFP MTDLL - but I use it. My understanding is that it is not a true MTDLL (like ISAPI) that can be queried regarding the status or nature of other active threads (sessions). The advantage of VFP MTDLL, i think, is that instanciation does not replicate copies of it in memeory. I just use it as a single threader. Your client will only be aware if it's thread.

I am waiting for for a VFP MTDLL service where one clients thread can "ask" the nature of another ("clients") thread.

Once SYS(2336) "queues" a thread in, the thread can intanciate other objects. My simple stuff uses (newobject) a "session" class inside a SYS(2336) "thread" for a structure - and then throws them away (ISAPI).

I don't typically use a COM as a "store". But, as long as the COM is connected, "your" client can reference "it's" properties. In true multi threading I think it is possible to refer to the status of other threads (sessionid).

>
>So in the STA model used by VFP MTDLLs, when an object is created on a thread, can another object of the same olepublic class be created on that same thread before the first object is destroyed? I mean, is this even possible? If it is possible, then there's a local storage issue that I don't understand. Or, is this a situation where the dispatcher decides "Thread A is still busy, so I need to create the next instance of the same object on Thread B (and in the process,maybe even create thread B)."
>
>Thanks very much.
Imagination is more important than knowledge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform