From: Rich Lane <rlane@club.cc.cmu.edu>
To: sup-talk@rubyforge.org
Subject: [sup-talk] [PATCH 4/4] force the index sync thread to give up the cpu
Date: Wed, 4 Nov 2009 21:45:21 -0800 [thread overview]
Message-ID: <1257399921-26813-4-git-send-email-rlane@club.cc.cmu.edu> (raw)
In-Reply-To: <1257399921-26813-3-git-send-email-rlane@club.cc.cmu.edu>
---
lib/sup/index.rb | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/sup/index.rb b/lib/sup/index.rb
index 1131ec7..4f491d6 100644
--- a/lib/sup/index.rb
+++ b/lib/sup/index.rb
@@ -201,6 +201,8 @@ class BaseIndex
while m = @sync_queue.deq
return if m == :die
update_message_state m
+ # Necessary to keep Xapian calls from lagging the UI too much.
+ sleep 0.03
end
end
end
--
1.6.4.2
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
next prev parent reply other threads:[~2009-11-05 5:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-05 5:45 [sup-talk] [PATCH 1/4] factor saving out of thread/message classes Rich Lane
2009-11-05 5:45 ` [sup-talk] [PATCH 2/4] async thread indexing Rich Lane
2009-11-05 5:45 ` [sup-talk] [PATCH 3/4] immediate " Rich Lane
2009-11-05 5:45 ` Rich Lane [this message]
2009-11-09 6:02 ` [sup-talk] [PATCH 2/4] async " Eugene Marinelli
2009-11-09 6:22 ` Rich Lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1257399921-26813-4-git-send-email-rlane@club.cc.cmu.edu \
--to=rlane@club.cc.cmu.edu \
--cc=sup-talk@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox