[Qt-interest] Multithreading - yield function

Patric userqt at gmail.com
Tue Sep 1 12:14:26 CEST 2009


This is really not cool...

----- Original Message ----- 
From: "Thomas Dähling" <t.daehling at googlemail.com>
To: "Patric" <userqt at gmail.com>
Cc: "Thiago Macieira" <thiago.macieira at trolltech.com>; 
<qt-interest at trolltech.com>
Sent: Tuesday, September 01, 2009 1:09 PM
Subject: Re: [Qt-interest] Multithreading - yield function


> 2009/9/1 Patric <userqt at gmail.com>:
>
>> you are telling me that if I have two threads that are running, I really
>> don't know when the second one will start executing in the middle of the
>> code ? And stop also.
>
> This sums it up pretty much, yes. Using threads means your program
> flow is now asynchronous, which in turn means that you cannot rely
> upon a specific order of thread execution (see
> http://en.wikipedia.org/wiki/Scheduling_(computing) for some basic
> information). What you can do, however, is provide QWaitConditions or
> other locking mechanisms to ensure that one thread will wait for
> another, if needed.
> 




More information about the Qt-interest-old mailing list