C++ (Qt)void Worker::task() { forever { // pause block sync.lock(); if (pause.load()) { // <- пробой здесь qDebug() << "Task[" << QThread::currentThreadId() << "] paused"; cond.wait(&sync); } sync.unlock();
C++ (Qt) while (pause) msleep(delay_,sec);
C++ (Qt)void Worker::task() { forever { // pause block sync.lock(); ... cond.wait(&sync);