[Checkins] SVN: relstorage/trunk/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:39:45 EDT 2009
Log message for revision 99678:
Compensate for low timer resolution in Windows by assuming that at least 10 ms elapsed between pack commits.
Changed:
U relstorage/trunk/relstorage/adapters/common.py
-=-
Modified: relstorage/trunk/relstorage/adapters/common.py
===================================================================
--- relstorage/trunk/relstorage/adapters/common.py 2009-05-03 01:49:24 UTC (rev 99677)
+++ relstorage/trunk/relstorage/adapters/common.py 2009-05-03 06:39:45 UTC (rev 99678)
@@ -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