Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Managing error event within critical section???
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01188583
Message ID:
01188693
Views:
17
Hi Mark,

>So consider possibly just putting SYS(2336,3) in the destroy event, just to be sure that any critical section that had been established within that thread gets freed upon destruction of the object. Will this work, just as a blanket cleanup operation, or could it cause probems?

Probably it works, but (at least to me) feels like a work around... In any case, the risks I see with this approach are:

a) You rely on Destroy being executed after you canceled execution. There might be scenarios where this is not the case. Most likely there isn't an issue, but you need to keep this in mind in case you encounter a lock situation despite having a work around implemented.

b) I've no idea where VFP keeps the count for critical sections. Depending on how this is implemented in VFP, the count might be shared across all instance of your COM server in different threads (stored with the runtime DLL or the COM DLL) or shared across all VFP COM server in the current thread (stored in Thread Local Storage specific to the runtime, not the COM DLL) or just shared across all COM objects in your DLL in a single thread (Thread Local Storage specific to the COM DLL).
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform