From dc41e749cc7b18ff143ed57b7e1df745088c9599 Mon Sep 17 00:00:00 2001 From: wmorgan Date: Mon, 21 May 2007 16:48:59 +0000 Subject: [PATCH] bugfix: killed threads shouldn't be hidden a priori by thread-index-mode git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@407 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- lib/sup/modes/thread-index-mode.rb | 6 +++--- lib/sup/thread.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index 1940e3b..0ee728f 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -124,7 +124,7 @@ class ThreadIndexMode < LineCursorMode def update ## let's see you do THIS in python - @threads = @ts.threads.select { |t| !@hidden_threads[t] && !t.has_label?(:killed) }.sort_by { |t| t.date }.reverse + @threads = @ts.threads.select { |t| !@hidden_threads[t] }.sort_by { |t| t.date }.reverse @size_width = (@threads.map { |t| t.size }.max || 0).num_digits regen_text end @@ -337,8 +337,8 @@ class ThreadIndexMode < LineCursorMode end def load_n_threads_background n=LOAD_MORE_THREAD_NUM, opts={} - return if @load_thread - @load_thread = Redwood::reporting_thread do + return if @load_thread # todo: wrap in mutex + @load_thread = Redwood::reporting_thread do num = load_n_threads n, opts opts[:when_done].call(num) if opts[:when_done] @load_thread = nil diff --git a/lib/sup/thread.rb b/lib/sup/thread.rb index 88611a1..e319553 100644 --- a/lib/sup/thread.rb +++ b/lib/sup/thread.rb @@ -305,7 +305,7 @@ class ThreadSet m = builder.call add_message m load_thread_for_message m, :load_killed => opts[:load_killed] - yield @threads.size if block_given? + yield size if block_given? end end -- 2.45.2