mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Prevent possible deadlock on exit
This commit is contained in:
parent
6e1484252a
commit
9b9b6bae99
|
@ -99,10 +99,11 @@ Core::~Core()
|
||||||
|
|
||||||
toxTimer->stop();
|
toxTimer->stop();
|
||||||
coreThread->exit(0);
|
coreThread->exit(0);
|
||||||
|
while (coreThread->isRunning())
|
||||||
|
{
|
||||||
qApp->processEvents();
|
qApp->processEvents();
|
||||||
coreThread->wait();
|
coreThread->wait(500);
|
||||||
if (coreThread->isRunning())
|
}
|
||||||
coreThread->terminate();
|
|
||||||
|
|
||||||
if (tox)
|
if (tox)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user