Browse Source

Revert "Delete CoreAV from the Core thread"

This reverts commit 1f758efc2f.
pull/2476/head
tux3 10 years ago
parent
commit
8d2ae07c9f
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
  1. 11
      src/core/core.cpp
  2. 3
      src/core/core.h

11
src/core/core.cpp

@ -77,12 +77,6 @@ Core::Core(QThread *CoreThread, Profile& profile) : @@ -77,12 +77,6 @@ Core::Core(QThread *CoreThread, Profile& profile) :
void Core::deadifyTox()
{
if (QThread::currentThread() != coreThread)
{
QMetaObject::invokeMethod(this, "deadifyTox", Qt::BlockingQueuedConnection);
return;
}
if (av)
{
delete av;
@ -105,9 +99,6 @@ Core::~Core() @@ -105,9 +99,6 @@ Core::~Core()
QMetaObject::invokeMethod(this, "killTimers", Qt::BlockingQueuedConnection,
Q_ARG(bool, false));
}
deadifyTox();
coreThread->exit(0);
while (coreThread->isRunning())
{
@ -115,6 +106,8 @@ Core::~Core() @@ -115,6 +106,8 @@ Core::~Core()
coreThread->wait(500);
}
deadifyTox();
Audio& audio = Audio::getInstance();
audio.closeInput();
audio.closeOutput();

3
src/core/core.h

@ -223,9 +223,10 @@ private: @@ -223,9 +223,10 @@ private:
void checkLastOnline(uint32_t friendId);
void deadifyTox();
private slots:
void killTimers(bool onlyStop); ///< Must only be called from the Core thread
void deadifyTox(); ///< Will call itself blocking queued on the Core thread
private:
Tox* tox;

Loading…
Cancel
Save