[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Active objects, threads, signals & slots
From:       Carsten Pfeiffer <carpdjih () mailbox ! tu-berlin ! de>
Date:       2002-11-06 1:44:52
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----

On Wednesday 06 November 2002 01:45, Michael Schuerig wrote:
> Yep. But that wouldn't help in this case, although my description was
> too spotty. The general structure here is
>
> while (true) {
>     wait_for_something_to_happen_with_timeout
>     if (something_happened) {
>         process
>     }
>     if (userCancelled) {
>         do_a_clean_exit
>     }
> }
>
> Most of the time is spent waiting.

What about doing this in a different thread? See QThread, QMutex, 
QWaitCondition, etc. You can safely post events from one thread to another.

Cheers
Carsten Pfeiffer
-----BEGIN PGP SIGNATURE-----

iQEVAwUBPch0FqWgYMJuwmZtAQGPlQf9GW66ZrTzJYU5ds+lRUvNabIBuWoyptiL
Ll/awSyB8+wGWAHEgJs7iNa1BiDqeFQJM6q5nhnycqRgHAC68Ztt7LuSGb4Cszr+
E9zwnwRCzRYllHSJJk4xWpFPfDu4AAVBJFV58SKygUElBgWV6rRdSLRqlXhGRIo/
w2Yq1eNddL+UoHRupE8HKEJmVGJR6We2410MCcBokON4OYzJnaOqFdBWYfFLuSc6
5wtp8xCBMHo9Y1Uv3wAK/yJ52bWBi5wRlCeVygWgZPpx4IvmSPTa1qSczjSugoBD
V9ANNpqlwfwxPctJy2QCaZRvb41Bd7eJNS5w5A5MQbrDLlbK2GFvUg==
=E6d5
-----END PGP SIGNATURE-----
 
>> 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