[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Replacement for processEvents() call within while loop
From: Vlad <vladc6 () yahoo ! com>
Date: 2007-09-27 0:08:02
Message-ID: 838456.94267.qm () web54408 ! mail ! yahoo ! com
[Download RAW message or body]
Hi,
I'm working on Fuse-KIO for KDE4, and I'd like to ask whether you know
a better approach to doing
while (!helper->done())
{
fuseApp->processEvents();
}
for filesystem operations in
http://websvn.kde.org/trunk/kdenonbeta/fuse_kio/fuse_kio/fuse_kio_ops.cpp?view=markup
.
I think a while loop such as this causes frequent CPU wakeups and
leads to reduced laptop battery life. One way to get around it would
be to make done() emit a signal. The problem is that, once the helper
is done, execution must revert to the function that currently contains
the while loop (ie. fuse_kio_getattr, fuse_kio_readlink,
fuse_kio_getdir, etc). Could this be achieved using threads?
Thank you very much for any suggestions you can offer,
Vlad
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/
>> 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