[mythtv-firehose] mythtv/master commit: c01fd21d5 by Daniel Kristjansson (daniel-kristjansson)
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
New Revision: c01fd21d5ffc6b90f39537289a60e7614c6fb9b8
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.
More information about the mythtv-firehose