commit 0a09e59be7dd822071df17d653e03f8c9c4994ce
parent 893f66f0601c415f5daee95eda8835eb2b31d5f3
Author: Gaute Hope <eg@gaute.vetsj.com>
Date: Wed, 17 Sep 2014 16:50:42 +0200
ti: don't update thread line when thread is empty.
there is most likely a race condition going on between updateing the
threads and updating the lines in the buffer. just return and skip
updating line if the thread that is set for the line is empty.
testing and debugging by @fxkr.
fixes #190.
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/lib/sup/modes/thread_index_mode.rb b/lib/sup/modes/thread_index_mode.rb
@@ -856,6 +856,12 @@ protected
need_update = false
@mutex.synchronize do
+ # and certainly not sure why this happens..
+ #
+ # probably a race condition between thread modification and updating
+ # going on.
+ return if @threads[l].empty?
+
@size_widgets[l] = size_widget_for_thread @threads[l]
@date_widgets[l] = date_widget_for_thread @threads[l]