Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/olpc/datastore/xapianindex.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/olpc/datastore/xapianindex.py')
-rw-r--r--src/olpc/datastore/xapianindex.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/olpc/datastore/xapianindex.py b/src/olpc/datastore/xapianindex.py
index 5f29feb..4aa4632 100644
--- a/src/olpc/datastore/xapianindex.py
+++ b/src/olpc/datastore/xapianindex.py
@@ -171,12 +171,15 @@ class IndexManager(object):
# property or backingstore._translatePath to get at it
versions = self.versions
inplace = self.inplace
-
+ q = self.queue
while self.indexer_running:
# include timeout here to ease shutdown of the thread
# if this is a non-issue we can simply allow it to block
try:
- data = self.queue.get(True, 0.025)
+ # XXX: on shutdown there is a race where the queue is
+ # joined while this get blocks, the exception seems
+ # harmless though
+ data = q.get(True, 0.025)
# when we enque a sequence of commands they happen
# under a single write lock pass through the loop and
# the changes become visible at once.