mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 07:35:41 +08:00
ASSERT when CContinuousWorker::quitAndWait is called by object thread -> deadlock
This commit is contained in:
committed by
Mathew Sutcliffe
parent
2a8e2331a3
commit
b49b7f8c71
@@ -161,6 +161,8 @@ namespace BlackMisc
|
||||
void CContinuousWorker::quitAndWait() noexcept
|
||||
{
|
||||
Q_ASSERT_X(!CThreadUtils::isApplicationThreadObjectThread(this), Q_FUNC_INFO, "Try to stop main thread");
|
||||
Q_ASSERT_X(!CThreadUtils::isCurrentThreadObjectThread(this), Q_FUNC_INFO, "Called by own thread, will deadlock");
|
||||
|
||||
setEnabled(false);
|
||||
auto *ownThread = thread();
|
||||
quit();
|
||||
|
||||
Reference in New Issue
Block a user