Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why does VFP have a MTDLL?
Message
 
To
26/01/2005 11:52:00
Joel Leach
Memorial Business Systems, Inc.
Tennessee, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00980541
Message ID:
00981096
Views:
65
>Hi Rick,
>
>>
>>Bottom line is this: VFP is not really multithreaded and in order to run multiple requests simultaneously it has to have more than a single copy of the runtime running.
>>
>
>Huh, I didn't know that. I figured the threads somehow shared the same runtime, thereby allowing higher scalability. Do the threads/runtimes run in the same process, or is that separate as well?

If multiple MTDLL requests happen simultaneously VFP runs seperate runtimes files. VFP actually makes a copy of for Fox9t.dll and uses that internally (or more than one for that matter). The reason for this I would guess is that VFP is internally is not thread safe. The T runtime has provisions that takes all the critical stuff that VFP uses and sticks it out to thread local storage but it can't use the same instance just the same.

MTDLLs aren't truly multi-threaded. They are STA threaded components and COM calls them from different threads and isolates the threads providing a simulation of multi-threading. THis is why you can't create multi-threaded code from VFP directly - you need a multi-threaded COM client calling into VFP to provide this functinality.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform