Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP MTDLL COM object -- persistence questions
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01061515
Message ID:
01064351
Views:
30
Hi Mark,

>What is your preferred technique for synchronizing access to the shared memory? Do you use a a mutex, or do you prefer to use the VFP SYS() critical section function?...

I use MUTEXes. However, it looks like waiting for a mutex takes away the CPU from the current thread and puts it into a wait state even when a MUTEX is available. Last time I tested this, waiting for a MUTEX took up to 10 ms which quickly accumulates in a loop. You might want to test performance on your system.

I haven't verified this, but my assumption is that VFP only uses one critical section object for its SYS() function. That means, you can't fine tune access to different shared memory blocks or features thereby loosing scalability. If that's not an issue for you, a critical section might actually be easier and faster than using a MUTEX.
--
Christof
Previous
Reply
Map
View

Click here to load this message in the networking platform