Qt/WASM seems to have no thread support

This commit is contained in:
Uwe Rathmann 2024-01-19 15:52:00 +01:00
parent 9f9fafe9ef
commit 02d76b199a
2 changed files with 8 additions and 0 deletions

View File

@ -204,14 +204,18 @@ void QskMetaFunction::invoke( QObject* object,
return;
}
#if QT_CONFIG(thread)
QSemaphore semaphore;
#endif
auto event = new QMetaCallEvent(
m_functionCall, nullptr, 0, argv, &semaphore );
QCoreApplication::postEvent( receiver, event );
#if QT_CONFIG(thread)
semaphore.acquire();
#endif
break;
}

View File

@ -192,14 +192,18 @@ static void qskInvokeMetaCall(
return;
}
#if QT_CONFIG(thread)
QSemaphore semaphore;
#endif
auto event = new MetaCallEvent( call, metaObject,
offset, index, args, &semaphore );
QCoreApplication::postEvent( receiver, event );
#if QT_CONFIG(thread)
semaphore.acquire();
#endif
break;
}