[Checkins] SVN: relstorage/branches/1.1/relstorage/adapters/common.py Compensate for low timer resolution in Windows by assuming that at least 10 ms elapsed between pack commits.
Shane Hathaway
shane at hathawaymix.org
Sun May 3 02:40:07 EDT 2009
Log message for revision 99679:
Compensate for low timer resolution in Windows by assuming that at least 10 ms elapsed between pack commits.
Changed:
U relstorage/branches/1.1/relstorage/adapters/common.py
-=-
Modified: relstorage/branches/1.1/relstorage/adapters/common.py
===================================================================
--- relstorage/branches/1.1/relstorage/adapters/common.py 2009-05-03 06:39:45 UTC (rev 99678)
+++ relstorage/branches/1.1/relstorage/adapters/common.py 2009-05-03 06:40:07 UTC (rev 99679)
@@ -790,6 +790,10 @@
self._release_commit_lock(cursor)
# Add a delay based on the configured duty cycle.
elapsed = time.time() - start
+ if elapsed == 0.0:
+ # Compensate for low timer resolution by
+ # assuming that at least 10 ms elapsed.
+ elapsed = 0.01
duty_cycle = options.pack_duty_cycle
if duty_cycle > 0.0 and duty_cycle < 1.0:
delay = min(options.pack_max_delay,
More information about the Checkins
mailing list