[Qt-interest] Multithreading - yield function

william.crocker at analog.com william.crocker at analog.com
Mon Aug 31 19:06:16 CEST 2009


> Hi guys,
> it seems for me that the yield function (QThread::yieldCurrentThread) is 
> not always working for me. Does anyone else know about problems with 
> this function ? Anyway to bypass it ?
>

Before Qt supported thread-yielding I would do this.
When the current thread slept, the OS would shift execution
to another thread. This was a non-CPU bound app where
the 1u could be tolerated.

#define YIELD usleep(1);

> Regards,
> Patric
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest



More information about the Qt-interest-old mailing list