Reputation: 4850
if the maximum wait time is 10 ms can i use qwaitcondition in Qt's main thread?
Upvotes: 0
Views: 902
Reputation: 3698
Nothing stops you from using QWaitCondition in the main thread. If you are setting the wait time to 10ms, and it passes without unlocking you will probably not get the desired effects you want. The default is to wait indefinitely.
However, using a wait condition in the main thread will cause the GUI to become unresponsive while it waits. This is almost always undesired.
Upvotes: 4