Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Preventing Multiple Launches
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00296974
Message ID:
00298812
Vues:
16
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.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform