[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Big Qthread vs. pthread and usleep problem (UPDATE)
From: Dirk Mueller <mueller () kde ! org>
Date: 2001-11-30 1:03:14
[Download RAW message or body]
On Don, 29 Nov 2001, Ivica Bukvic wrote:
> Well, I figured out how to use Qthread, but it seems rather unstable in
> the 2.2 version when it comes to time-critical events, and besides it
> has the same problem with the usleep function. Now the other even more
> funny thing is that the usleep function kept accurate sleep times, but
> somehow they are twice as much, so what I ended up doing is doubling the
> call to update the timer per cycle of the thread, and now the timer is
> back in the working condition. Nonetheless, this is a highly unusual,
> since when I implemented the double call, the gui "laggyness" also
> vanished... go figure :-). If anyone has any idea what the heck is wrong
> with this picture, I'd be greatly thankfull if you shared your knowledge
> regarding this issue wth me! Thanks!
Well, QThread is just a thin layer above pthread so you won't get any
different behaviour than by using plain pthread.
I can't you what exactly the problem with usleep and threads is but it is
known that it does not work. once again, use select() or use the Qt timing
stuff.
Dirk
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic