Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speed tip needed
Message
De
05/06/2001 11:24:06
Mike Mattos
Nationwide Computers
Mississauga, Ontario, Canada
 
 
À
05/06/2001 11:04:26
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00514404
Message ID:
00515142
Vues:
24
EUREKA !!

seems that UNLOCK is the magic bullet!

FLUSH, SET REFRESH to 1, RLOCK() seem to have no effect, but just adding UNLOCK after the REPLACE command reduced loop time from 5 seconds to 1 second !

REVISED SERVER CODE

CREATE TABLE servtab (t1 c(8),t2 c(8), t3 c(8), new l)
use servtab shared
DO WHILE reccount() < 5
=sleeper(1) && sleep 1 second
GO TOP
LOCATE FOR new
IF FOUND()
REPLACE t2 WITH TIME() , new WITH .F.
unlock && <<<< improved response time at client by 80%
ENDIF
ENDDO
brow
use

PROCEDURE sleeper
PARAMETER secs
DECLARE Sleep IN Win32API INTEGER nMilliseconds
nmilliseconds = secs * 1000
=sleep(nmilliseconds)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform