From a2d2b69be208a27f334ffe5d503bbcb170f95291 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 6 Apr 2010 18:15:27 +0000 Subject: [PATCH] fix 100% CPU usage after killing JACK caused by faulty logic in butler thread main loop git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6864 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_butler.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/ardour/session_butler.cc b/libs/ardour/session_butler.cc index 9d4ee5678b..073371dc17 100644 --- a/libs/ardour/session_butler.cc +++ b/libs/ardour/session_butler.cc @@ -175,7 +175,7 @@ Session::butler_thread_work () while (true) { pfd[0].fd = butler_request_pipe[0]; pfd[0].events = POLLIN|POLLERR|POLLHUP; - + if (poll (pfd, 1, (disk_work_outstanding ? 0 : -1)) < 0) { if (errno == EINTR) { @@ -281,7 +281,7 @@ Session::butler_thread_work () } - if (i != dsl->end()) { + if (i != dsl->begin() && i != dsl->end()) { /* we didn't get to all the streams */ disk_work_outstanding = true; } @@ -333,8 +333,8 @@ Session::butler_thread_work () */ request_stop (); } - - if (i != dsl->end()) { + + if (i != dsl->begin() && i != dsl->end()) { /* we didn't get to all the streams */ disk_work_outstanding = true; }