[mythtv-firehose] mythtv/devel/mythtv-rec2 commit: fe429063f by Daniel Kristjansson (daniel-kristjansson)
MythTV
noreply at mythtv.org
Tue Apr 10 07:43:01 UTC 2012
Author: Daniel Kristjansson <danielk at cuymedia.net>
Change Date: 2011-03-22T08:02:24-07:00
Push Date: 2012/04/10 00:41:52 -0700
Repository: mythtv
Branch: devel/mythtv-rec2
New Revision: fe429063f7e42ace8bbc4f5ae79ac7e4122b991b
Changeset: https://github.com/MythTV/mythtv/commit/fe429063f
Log:
Tries to avoid QThread::terminate() in pthread->QThread port of HouseKeeper threads [64d51365568348b91e30].
Killing threads this way can result in deadlocks and hence is heavily discouraged. We also limit when termination can occur to the MythSystem::Wait() call in the MFD thread.
We also wait on the threads to start after calling QThread::start(). This is required because the QThread::wait() wait() call will return immediately if the thread isn't running yet and we depend of QThread::wait() as a sort of poor man's pthread_join(). A QThread will blithely destruct itself while it's thread is still running, resulting in some "entertaining" backtraces.
Modified:
mythtv/programs/mythbackend/housekeeper.cpp
mythtv/programs/mythbackend/housekeeper.h
More information about the mythtv-firehose
mailing list