Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
13deede
commit c01fd21
Showing
4 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters