Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question about FLOCK and REPROCESS
Message
 
 
À
15/02/2001 13:59:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00476348
Message ID:
00476417
Vues:
26
>>>Table is open in both datasession.
>>>
>>>What I don't understand is that I get the message without any delay, it does not try for 100 seconds as I asked with set reprocess to 100 seconds.
>>
>>Using the same VFP application session, I can duplicate your observations. However, if I open 2 instances of VFP, reprocess works correctly. I don't know if this is a bug or by design. The following code will reproduce your observations:
>>oSession = newobject('session')
>>set datasession to oSession.DataSessionID
>>set exclusive off
>>set multilocks on
>>set reprocess to 10 seconds
>>use some_table
>>flock()   && file is locked
>>
>>set datasession to 1  && default DS
>>set exclusive off
>>set multilocks on
>>set reprocess to 10 seconds
>>use some_table
>>? flock()  && FALSE is immediately returned
>
>Interesting note to your code, Mark.
>
>If from the command window, after the above code has been run, you type "FLOCK()" it returns .T.
>
>It never did in code, even if I waited (=INKEY(.5)) or did multiple FLOCK() commands. Only from the command window.
>
>What's up with that???????

Unless oSession is public, it goes out of scope as soon as the prg runs.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform