[mythtv-commits] mythtv/master commit: c01fd21d5 by Daniel Kristjansson (daniel-kristjansson)
MythTV
noreply at mythtv.org
Thu Jul 28 16:13:06 UTC 2011
Author: Daniel Kristjansson <danielk at cuymedia.net>
Change Date: 2011-07-28T09:12:19-07:00
Push Date: 2011/07/28 09:12:57 -0700
Repository: mythtv
Branch: master
New Revision: c01fd21d5ffc6b90f39537289a60e7614c6fb9b8
Changeset: https://github.com/MythTV/mythtv/commit/c01fd21d5
Log:
Fix some mythbackend shutdown races.
The Scheduler and AutoExpirer each keep a pointer to MainServer, but the main server was being deleted while those threads were still running with a pointer to the deleted MainServer. The scheduler doesn't have any semaphore for the variable so this shuts down that thread in the MainServer dtor. AutoExpire does mutex protect the variable, so this just adds a AutoExpirer::SetMainServer(NULL) call to the MainServer dtor for that one.
The HouseKeeping thread wasn't being explicitly stopped, but keeps a pointer to the scheduler and uses gCoreContext.. so we now tear it down before we delete the Scheduler and MythCoreContext.
The JobQueue thread wasn't being explicitly stopped, but used the gCoreContext; we now tear it down before we delete MythCoreContext.
Modified:
mythtv/programs/mythbackend/main_helpers.cpp
mythtv/programs/mythbackend/mainserver.cpp
mythtv/programs/mythbackend/scheduler.cpp
mythtv/programs/mythbackend/scheduler.h
More information about the mythtv-commits
mailing list