Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP is Multithread or MultiProcess?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00852517
Message ID:
00852739
Vues:
7
As long as multiple threads are (seemingly) working simultaneously I won't complain about the purity of the technology. For things like web applications for all but the largest sites, for example, this STA multi-threading technology should work fine as you've pointed out in many of your articles...
>VFP MTDLLs are not truly multithreaded. They are compatible with COM STA Apartment threading which allows multiple instances of an essentially single threaded DLL to be mapped into the same address space. The end result is that you have multiple instances (although more light weight) that are mapped into a process and essentially allow you a simulation of multithreading through the COM mechanics. COM spins up the threads and calls the STA compoennts on it and keeps the isolation in place.
>
>This is different than truly multi-threaded code like C++, .Net etc. which is physically re-entrant: The same piece of code can and is called by multiple threads. MTA (or free) threaded applications work on this principle.
>
>VFP MTDLLs work, but htey are limited to what COM and the thread pool manager that hosts it provides (for example, ASP creates only a handful of pool threads for COM objects)... with a true free threaded componetn you can manage all of that yourself. Further VFP MTDLLs MUST be called on a thread that is configured for STA - if you call it on an MTA thread it will corrupt badly (which you can easily see if you run a VFP COM component in ASP.Net without using ASPCOMPAT="true").
>
>That all said, VFP MTDLLs work well for many things, but htere are gotchas to some of this stuff such as leakage of public vars etc. that are tricky to debug if you run into those issues. In short you have to know what you're doing and how it works to efficiently deal with them.
>
>
>
>+++ Rick ---
>
>
>
>>VFP-MTDLL - yes, it's multi-threaded, but you need to call it from an exe. For example, it works great from an IIS web server which is an EXE.
>>VFP-EXE - no, but there are some workarounds including this:
>>http://www.geocities.com/rremus/multithreaded_vfp.htm and using the CreateProcess API which technically is not another thread, but, might accomplish what you want...
>>>I don´t know.
>>>
>>>Regards,
>>>José Luis
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform