]> git.cworth.org Git - sup/commitdiff
ui responsiveness tweaks
authorRich Lane <rlane@club.cc.cmu.edu>
Sun, 23 Aug 2009 18:46:11 +0000 (11:46 -0700)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Thu, 3 Sep 2009 17:53:30 +0000 (13:53 -0400)
bin/sup
lib/sup/modes/thread-index-mode.rb

diff --git a/bin/sup b/bin/sup
index bbb6c1711a7d5f580530a95859b4853649bf69c9..de0572cfda2cda7f83ebcc33597db5a2a72331ab 100755 (executable)
--- 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
 
index fb6b2ce71c69b68011c622ef31b572f5288497d7..177431b5248ea87e84226a5a9b8cac05ff0ef53b 100644 (file)
@@ -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 } }