[Interest] QEventLoop ::hasPendingEvents() replacement?

Thiago Macieira thiago.macieira at intel.com
Wed Jun 26 18:00:36 CEST 2019


On Tuesday, 25 June 2019 23:58:53 PDT Fabrice Mousset | GEOCEPT GmbH wrote:
> I will have to rework the whole process.
> I have a worker class (with his own thread), and before allowing a new task
> to be started I have to be sure previous task has been finished.

Yes, you will have to rework because your description of the problem has a 
race condition. What happens if the check whether the task has finished says 
"it hasn't", but as soon as the function returned, the task did finish?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products






More information about the Interest mailing list