Qt信号到另一个线程排队了吗?

时间:2018-09-14 16:50:47

标签: c++ qt5 qthread

如果我有

class Worker : public QObject
{
  Q_OBJECT

public:

  Worker();

public slots:

  void doStuff();
}

像这样运行它(假设我们在Foo类中):

auto worker = new Worker;
connect(this, &Foo::stuffRequested, worker, &Worker::doStuff);
QThread workerThread;
worker->moveToThread(&workerThread);
workerThread.start();

现在,如果我频繁发出stuffRequested(),以致工人无法跟上情况了?信号调用是否排队?

0 个答案:

没有答案