int waitForThreadCompletion(ThreadIdentifier threadID, void** result)
{
    ASSERT(threadID);

    GThread* thread = threadForIdentifier(threadID);

    void* joinResult = g_thread_join(thread);
    if (result)
        *result = joinResult;

    clearThreadForIdentifier(threadID);
    return 0;
}
Beispiel #2
0
int waitForThreadCompletion(ThreadIdentifier threadID, void** result)
{
    Q_ASSERT(threadID);

    QThread* thread = threadForIdentifier(threadID);

    bool res = thread->wait();

    clearThreadForIdentifier(threadID);
    if (result)
        *result = static_cast<ThreadPrivate*>(thread)->getReturnValue();

    return !res;
}
Beispiel #3
0
void detachThread(ThreadIdentifier threadID)
{
    Q_ASSERT(threadID);
    clearThreadForIdentifier(threadID);
}