Qt/WASM seems to have no thread support
This commit is contained in:
parent
9f9fafe9ef
commit
02d76b199a
|
@ -204,14 +204,18 @@ void QskMetaFunction::invoke( QObject* object,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_CONFIG(thread)
|
||||||
QSemaphore semaphore;
|
QSemaphore semaphore;
|
||||||
|
#endif
|
||||||
|
|
||||||
auto event = new QMetaCallEvent(
|
auto event = new QMetaCallEvent(
|
||||||
m_functionCall, nullptr, 0, argv, &semaphore );
|
m_functionCall, nullptr, 0, argv, &semaphore );
|
||||||
|
|
||||||
QCoreApplication::postEvent( receiver, event );
|
QCoreApplication::postEvent( receiver, event );
|
||||||
|
|
||||||
|
#if QT_CONFIG(thread)
|
||||||
semaphore.acquire();
|
semaphore.acquire();
|
||||||
|
#endif
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,14 +192,18 @@ static void qskInvokeMetaCall(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_CONFIG(thread)
|
||||||
QSemaphore semaphore;
|
QSemaphore semaphore;
|
||||||
|
#endif
|
||||||
|
|
||||||
auto event = new MetaCallEvent( call, metaObject,
|
auto event = new MetaCallEvent( call, metaObject,
|
||||||
offset, index, args, &semaphore );
|
offset, index, args, &semaphore );
|
||||||
|
|
||||||
QCoreApplication::postEvent( receiver, event );
|
QCoreApplication::postEvent( receiver, event );
|
||||||
|
|
||||||
|
#if QT_CONFIG(thread)
|
||||||
semaphore.acquire();
|
semaphore.acquire();
|
||||||
|
#endif
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue