[mythtv-commits] mythtv branch master updated by stuartm. v0.27-pre2-1182-g10c80db

Git Repo Owner noreply at mythtv.org
Sun Jun 2 09:33:19 UTC 2013


The branch, master has been updated on the
mythtv repository by gitolite user stuartm.
       via  10c80db8b40c1f2f0a37dc7bc51b1885963290f5 (commit)
      from  c8a3eedc10520aacca5296accfeddbeb311843af (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 10c80db8b40c1f2f0a37dc7bc51b1885963290f5
Author:    Stuart Morgan <smorgan at mythtv.org> at Sun, 2 Jun 2013 10:15:06 +0100
Committer: Stuart Morgan <smorgan at mythtv.org> at Sun, 2 Jun 2013 10:22:37 +0100
URL:       http://code.mythtv.org/cgit/mythtv/commit/?id=10c80db8b40c1f2f0a37dc7bc51b1885963290f5

Fix hang in applications when threadpool thread fails to run.
In the event that a thread pool threads fails to start do not leave it
in the list of running threads which can lead to us waiting
indefinitely for it to finish in MThreadPool::waitForDone(). The fix
is to immediately remove the thread from the list of running threads
if IsRunning() is false immediately after calling start() - see
start() in qthread-unix.cpp. N.B. IsFinished() is false in this
scenario because the thread never started.

When this occurs, either because we've hit the system thread limit or
we've run out of memory QThread (on unix/linux) will print:
"QThread::start: Thread creation error: Resource temporarily
unavailable"

Shortly afterwards the thread calling MThreadPool::waitForDone() would
hang, in the case of the frontend this may be the UI thread in the
MythImage destructor.



-----------------------------------------------------------------------

Summary of changes:
 mythtv/libs/libmythbase/mthreadpool.cpp |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

-- 



More information about the mythtv-commits mailing list