Follow-up: Win32/Posix file locking
David Bolen
db3l at fitlinxx.com
Thu Aug 30 00:59:09 EDT 2001
Sheila King <sheila at spamcop.net> writes:
> What sort of time interval would you suggest? 0.1 seconds, perhaps? Or
> is that too short?
That should be more than enough - generally anything over 0 will at
least yield your timeslice to anything else that wants to run and
prevent you from hogging the CPU (even a time.sleep(0.01) under
Windows can be the difference between <1% CPU and 100% CPU).
Although since you're looping around I/O operations to the filesystem
it's unlikely you'd actually pin the CPU, but it's always a good
technique to follow anywhere you're looping anyway.
--
-- David
--
/-----------------------------------------------------------------------\
\ David Bolen \ E-mail: db3l at fitlinxx.com /
| FitLinxx, Inc. \ Phone: (203) 708-5192 |
/ 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \
\-----------------------------------------------------------------------/
More information about the Python-list
mailing list