mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
Ref T312, fixed thread safety of listeners start/stop/check
This commit is contained in:
@@ -443,10 +443,10 @@ namespace BlackSimPlugin
|
||||
void CSimulatorEmulatedListener::startImpl()
|
||||
{
|
||||
if (this->isShuttingDown()) { return; }
|
||||
const QPointer<CSimulatorEmulatedListener> guard(this);
|
||||
const QPointer<CSimulatorEmulatedListener> myself(this);
|
||||
QTimer::singleShot(2000, this, [ = ]
|
||||
{
|
||||
if (!guard) { return; }
|
||||
if (!myself) { return; }
|
||||
Q_ASSERT_X(this->getPluginInfo().isValid(), Q_FUNC_INFO, "Invalid plugin");
|
||||
emit this->simulatorStarted(this->getPluginInfo());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user