Please nominate your Qt Champions for 2021!

how to properly pause and resume QThread execution?

  • how to make threads to be in sleep or running state?

  • Moderators

    QSemaphore barrier;
    // In thread supposed to sleep:
    // In thread that wakes the sleeping thread:

    Be careful though, because you're asking for trouble putting a thread to sleep for too long (it won't be able to process events) and also try not to deadlock it. :)

Log in to reply