How to handle a "wait for file" situation
George C Brackett
gbrackett at luceatlux.com
Tue Jun 9 11:54:19 EDT 2009
I'm not sure, but this might work: If you divide your script into two
pieces
on firstPart
on secondPart
using whatever script local variables you need for them to
communicate, then you could say in the last line of firstPart
send "secondPart" to me in 18 seconds
This way you're not blocking the processor. I guess to avoid having
the firstPart execute again during the 18 seconds you will have to set
a flag that you're "waiting" and bail if the flag is set. Would that
work?
George
On Jun 9, 2009, at 10:16 AM, Richard Miller wrote:
Not sure of the best way to handle this.
I have a script that gets to a point in its processing where it needs
to wait up to 18 seconds for the appearance of a file. I know I can
use a simple "repeat until there is a file xxx" type of loop (exiting
from the loop if the time exceeds 18 seconds), but I'm thinking
there's a better way to handle this. This script is running on a cgi
server and there could be numerous simultaneous scripts doing the same
thing... so I want to minimize the load on the CPU.
Suggestions?
Thanks.
Richard Miller
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list