sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 0646c7e1688bf8755e5eb1a97dfa2d787acd1204
parent d50ad629bc9321980abeaeeebf17a935c300a7b1
Author: Rich Lane <rlane@club.cc.cmu.edu>
Date:   Sun, 23 Aug 2009 11:46:11 -0700

ui responsiveness tweaks

Diffstat:
M bin/sup | 1 +
M lib/sup/modes/thread-index-mode.rb | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/bin/sup b/bin/sup
@@ -58,6 +58,7 @@ if $opts[:list_hooks]
 end
 
 Thread.abort_on_exception = true # make debugging possible
+Thread.current.priority = 1 # keep ui responsive
 
 module Redwood
 
diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
@@ -76,8 +76,7 @@ EOS
     @last_load_more_size = nil
     to_load_more do |size|
       next if @last_load_more_size == 0
-      load_threads :num => 1, :background => false
-      load_threads :num => (size - 1),
+      load_threads :num => size,
                    :when_done => lambda { |num| @last_load_more_size = num }
     end
   end
@@ -627,6 +626,7 @@ EOS
         BufferManager.draw_screen
         last_update = Time.now
       end
+      ::Thread.pass
       break if @interrupt_search
     end
     @ts.threads.each { |th| th.labels.each { |l| LabelManager << l } }