Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP critical section: uniqueness question
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
VFP critical section: uniqueness question
Miscellaneous
Thread ID:
01160316
Message ID:
01160316
Views:
67
I need help understanding how SYS(2336) critical section functionality is provided by VFP. My particular question is this: Is there only a single VFP critical section object that exists at one time per process (e.g., a process such as IIS using apartment model threading with a VFP COM MTDLL), this regardless of where and how many times in one's code a SYS(2336,1) is asserted,? For example, somewhere in my code:
sys(2336,1)
IF !FILE(SomeFile)
  DO something to create the file
endif
sys(2336,2)
and then somewhere else in code running as part of the same MDTLL (possibly even invoked by the MTDLL as an "external" FXP module), there is another critical section:
sys(2336,1)
IF !FILE(SomeOTHERfile)
  DO something to create SomeOTHERfile
endif
sys(2336,2)
In this situation, while the first critical section is being executed to check for FILE(SomeFile), is the other unrelated critical section that checks for FILE(SomeOTHERfile) also blocked from other threads until the first critical section is exited?

Taking the question a bit further, what if my IIS app uses two different VFP COM MTDLL's (each compiled as separate DLL)? Does this change the possible number of "concurrently" executing critical sections?

Thank you!
Next
Reply
Map
View

Click here to load this message in the networking platform