Commit e15aeeca authored by Tim Peters's avatar Tim Peters

checkPackLotsWhileWriting: remove excess generality. Only one client

thread is interesting here, so removed the hair catering to the possiblity
of N > 1 threads.
parent 9516493c
...@@ -286,18 +286,13 @@ class PackableStorage(PackableStorageBase): ...@@ -286,18 +286,13 @@ class PackableStorage(PackableStorageBase):
NUM_LOOP_TRIP = 100 NUM_LOOP_TRIP = 100
timer = ElapsedTimer(time.time()) timer = ElapsedTimer(time.time())
threads = [ClientThread(db, choices, NUM_LOOP_TRIP, timer, i) thread = ClientThread(db, choices, NUM_LOOP_TRIP, timer, 0)
for i in range(1)] thread.start()
for t in threads: while thread.isAlive():
t.start()
while True in [t.isAlive() for t in threads]:
db.pack(packt) db.pack(packt)
snooze() snooze()
packt = time.time() packt = time.time()
thread.join()
for t in threads:
t.join()
# Iterate over the storage to make sure it's sane. # Iterate over the storage to make sure it's sane.
if not hasattr(self._storage, "iterator"): if not hasattr(self._storage, "iterator"):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment