QThread::wait() and QThread::finished()

c++, multithreading, qt, qthread

Solution

No, it may return before, during or after a slot associated with signal `finished()` is being executed.

This depends on the type of signal-slot connection, read about queued connections and direct connections.

Problem

Does QThread::wait() return (i.e., unblocks execution) after calling all the slots that were associated with QThread::finished() signal? Thanks in advance.

Original source