mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Term deadlocked threads on exit
To prevent deadlocking the whole thing when we really just want to exit Qt w/ pulseaudio can deadlock internally on call start if it fails to connect to the PA context. Awesome.
This commit is contained in:
parent
c657296535
commit
8602327d16
|
@ -219,7 +219,9 @@ Widget::~Widget()
|
||||||
core->saveConfiguration();
|
core->saveConfiguration();
|
||||||
instance = nullptr;
|
instance = nullptr;
|
||||||
coreThread->exit();
|
coreThread->exit();
|
||||||
coreThread->wait();
|
coreThread->wait(500); // In case of deadlock (can happen with QtAudio/PA bugs)
|
||||||
|
if (!coreThread->isFinished())
|
||||||
|
coreThread->terminate();
|
||||||
delete core;
|
delete core;
|
||||||
delete camview;
|
delete camview;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user