Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我有一个线程类,其run方法如下:
run
void run() { while(1){ first_job(); //__Syncthreads(); second_job(); } }
我有 3 个线程,我希望所有线程都执行first_job()并等待其他线程完成first_job(),然后再执行second_job() 我知道有一些调用QWaitCondition,但我认为我需要一个额外的线程。我是真的吗?
first_job()
second_job()
QWaitCondition