Mr. Bill, 
If the load is not so much, I think you right.
My program will call WebServices continuously. If demands are much, I may
run the same program more than one in the server. If I use timer event, I
don't sure what should be the intervals. More interval means client wait
more, short intervals may decrease the capture of stop button click event.
I mean when user click the stop button, if program in job, will not reponse.
Isn't it?

Ali Ihsan 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Bill Arnold
Sent: Monday, January 08, 2007 12:35 PM
To: [EMAIL PROTECTED]
Subject: RE: Escape from Infinite loop


> The loop can do something like this:
> 
> 
> do while .t.
>    if file("myservice.txt")
>        *** Code to open DBF, look for records, and process
>    else
>        exit
>    endif
> enddo
> So if myservice.txt exists, the loop keeps running. If it 
> gets deleted, the loop stops.
> 
> One benefit of this method is that the loop can be terminated 
> by deleting a file from Windows explorer, if all else fails. 


Wouldn't it be better to put the test into a timer event, so it doesn't
waste resources? I haven't implemented your appoach anywhere, but can
see it's usefulness. I'd just like not to eat a lot of resources when in
this mode, which potentially can go on for some time. Also, I am
assuming that timer-driven events are a hardware (clock) thing and not a
loop somewhere within VFP's runtime, in which case it doesn't matter as
much. 

I believe this question has come up before, but don't think I got a
clear understanding of it: do timer events eat any resources while
waiting to fire?


Bill




> Cloud Music Company



[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to