Skip to content

Commit

Permalink
TV: Remove database initialisation lock
Browse files Browse the repository at this point in the history
- this may have worked asynchronously in the past, but the current
implementation initialises the settings from the db in the constructor
(InitFromDB) which always (!) preceeds the call to Init - which waits
for the db...
  • Loading branch information
mark-kendall committed Sep 29, 2020
1 parent adec070 commit 7d0100a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
13 changes: 0 additions & 13 deletions mythtv/libs/libmythtv/tv_play.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1104,10 +1104,6 @@ void TV::InitFromDB()

gCoreContext->addListener(this);
gCoreContext->RegisterForPlayback(this, SLOT(StopPlayback()));

QMutexLocker lock(&m_initFromDBLock);
m_initFromDBDone = true;
m_initFromDBWait.wakeAll();
}

/** \fn TV::Init(bool)
Expand Down Expand Up @@ -1176,15 +1172,6 @@ bool TV::Init()
mainwindow->installEventFilter(this);
QCoreApplication::processEvents();

{
QMutexLocker locker(&m_initFromDBLock);
while (!m_initFromDBDone)
{
QCoreApplication::processEvents();
m_initFromDBWait.wait(&m_initFromDBLock, 50);
}
}

GetPlayerReadLock();
m_playerContext.m_ffRewState = 0;
m_playerContext.m_ffRewIndex = kInitFFRWSpeed;
Expand Down
4 changes: 0 additions & 4 deletions mythtv/libs/libmythtv/tv_play.h
Original file line number Diff line number Diff line change
Expand Up @@ -681,10 +681,6 @@ class MTV_PUBLIC TV : public QObject, public MenuItemDisplayer, public Reference
QElapsedTimer m_ctorTime;
uint m_switchToInputId {0};

QMutex m_initFromDBLock;
bool m_initFromDBDone {false};
QWaitCondition m_initFromDBWait;

/// True if the user told MythTV to stop plaback. If this is false
/// when we exit the player, we display an error screen.
mutable bool m_wantsToQuit {true};
Expand Down

0 comments on commit 7d0100a

Please sign in to comment.