[Qt-interest] Multithreading - yield function
william.crocker at analog.com
william.crocker at analog.com
Mon Aug 31 19:18:49 CEST 2009
william.crocker at analog.com wrote:
>> 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.
>
Also, be sure you are not holding and locks when you yield.
> #define YIELD usleep(1);
>
>> Regards,
>> Patric
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
> _______________________________________________
> 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