diff options
author | Robin Gareus <robin@gareus.org> | 2015-10-22 12:20:42 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-10-22 12:20:42 +0200 |
commit | 5bdc869e498d13cfa7dbd004ae41e6524fc94029 (patch) | |
tree | 0ad336f1a20175a69e91e870da3ef5baec021fb1 /libs/canvas/wave_view.cc | |
parent | d31ac095e02db42b12d1d87051ea0d99bf6834e0 (diff) |
remove invalid assertion - #6634
There is a highly unlikely case where the render thread can have zero
requests in the queue, but it is not supposed to be terminated.
1) WaveView::queue_get_image();
wake up thread, *but* the thread does not start yet
2) WaveView::cancel_my_render_request();
and now the thread starts.
1,2 are initiated by user actions from the GUI thread and are normally
orders of magnitude slower than scheduler-thread wakeup.
Diffstat (limited to 'libs/canvas/wave_view.cc')
-rw-r--r-- | libs/canvas/wave_view.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/canvas/wave_view.cc b/libs/canvas/wave_view.cc index fce30e7f38..a193e8c339 100644 --- a/libs/canvas/wave_view.cc +++ b/libs/canvas/wave_view.cc @@ -1508,7 +1508,7 @@ WaveView::start_drawing_thread () void WaveView::stop_drawing_thread () { - if (_drawing_thread) { + while (_drawing_thread) { Glib::Threads::Mutex::Lock lm (request_queue_lock); g_atomic_int_set (&drawing_thread_should_quit, 1); request_cond.signal (); @@ -1537,8 +1537,7 @@ WaveView::drawing_thread () } if (request_queue.empty()) { - assert (g_atomic_int_get (&drawing_thread_should_quit)); - continue; // or break; + continue; } /* remove the request from the queue (remember: the "request" |