Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speed tip needed
Message
From
05/06/2001 11:24:06
Mike Mattos
Nationwide Computers
Mississauga, Ontario, Canada
 
 
To
05/06/2001 11:04:26
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00514404
Message ID:
00515142
Views:
23
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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform