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:
00298820
Views:
23
>Hi Ramon,
>
>First, I'll admit the my previous statement regarding an un-owned mutex was erroneous. It will usually be destroyed when the thread that created it shuts down. However, there are a couple of points which, are not subject to debate.
>
>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.
>
>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.
>
>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.

In addition, shutdowns via TerminateProcess() don't clean up, either, and are likely to require a reboot to clean up the system.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform