forked from qt-creator/qt-creator
Docker: Fix threading
Make sure that the container state is synchronized with the main thread. Change-Id: I8b50a380779038b273a1eb6645aa08309e90bc56 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -888,6 +888,15 @@ expected_str<void> DockerDevicePrivate::startContainer()
|
||||
|
||||
bool DockerDevicePrivate::updateContainerAccess()
|
||||
{
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result = false;
|
||||
QMetaObject::invokeMethod(this,
|
||||
&DockerDevicePrivate::updateContainerAccess,
|
||||
Qt::BlockingQueuedConnection,
|
||||
&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
if (m_isShutdown)
|
||||
return false;
|
||||
|
||||
|
Reference in New Issue
Block a user