Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preventing Multiple Launches
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00296974
Message ID:
00298824
Views:
19
>First, in design, if you fail to release the mutex (via the functions I mentioned previously), you will have to close and re-start VFP in order to do further testing. This is because VFP is the thread that created the mutex, not the VFP application. Simply exiting an VFP application in design mode will not destroy the mutex.
>

The example was mean to test that the system does release the mutex, and I said that you should build a executable.

>Further, failing to do is, IMHO, bad design. Any application should, take steps restore the state of the environment to that which it originally found it. Relying on Windows to clean up after something that I (the programmer) did, is simply a bad design choice.

Agreed. But, if for some reason this cleaning code doesn't get called because some unexpected error, you still can start the application again.

>
>Second, if a thread terminates abnormally via a GPF, the mutex will not be destroyed. This is not subject to debate because I've experienced it first hand. Be advised that code was included in the application shutdown to release and destroy the mutex, and it remained.

I need to be able to intentionally generate a GPF to test this.
OTOH, If someone get a GPF in Windows 9x, I think it would be recommended to reboot.

Just an opinion... Not a fact.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform