Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you lock a record fast?
Message
 
À
27/02/2003 13:13:37
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00758830
Message ID:
00759252
Vues:
27
>Hi Paul,
>
>>I think that long-term locks on records aren't a good idea.
>
>Wel they're excellent in telling if a client application that has locked the record is still running. I think that is the purpose of the mechanism here.
>
>>I prefer to use a field with a value that indicates the row is in use.
>
>Again, if the application crashes the record never gets released.
>
>Walter,

Walter,

I used to use the lock technique for tracking semaphore locks. I did this this way because if the station holding the semaphore lock crashes, after a shor ttime the server will release the resources that station had locked, therefore if in attempting to get a semaphore I found one that someone else had gotten I could try RLock() and if I failed then the existing semaphore is valid, if I succeeded to get a lock then the semapghore that exists is bogus (maybe a crash or a system shutdown) so I can allow the new process to have a semaphore.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform