QThread is a threading class provided by the cross-platform Qt framework.
As of Qt 4.3, the default QThread
object executes an event loop in his run()
method. Thus, it is discouraged to subclass QThread
for concurrent execution. Instead all operations which are required to be executed concurrently should be encapsulated into one or more QObject
with signals and slots as a mechanism to communicate data. These objects can then be "moved" to the Qthread
object.
This allow concurrent programming without the need for a lock, a condition variable, or a semaphore