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

List:       kfm-devel
Subject:    Reflexion about NetAccess (enter_loop/exit_loop)
From:       David Faure <david () mandrakesoft ! com>
Date:       2000-06-27 22:44:17
[Download RAW message or body]

One thought about that enter_loop/exit_loop trick.
If one starts 15 'jobs' at once using NetAccess....
then say the 8th returns. How does Qt's event loop know that it
has to return in the 8th NetAccess instance ?
It won't, right ? AFAIK the last exit_loop brings the control back to
where the last enter_loop was done... so the order has to be kept,
which is almost impossible since jobs are async and unpredictable :)

This means, somebody using NetAccess should make sure he does
only one call at a time. Of course doing calls from a loop only does
one at a time, but if NetAccess calls are started from Qt events,
then multiple ones could be started at the same time.

I'm getting rid of NetAccess in the image preview feature - where at some point,
indeed, multiple calls to KonqFileItem::pixmap() could be made at the same
time (even with the current CVS, this could happen in some circumstances,
like changing the icon size, etc.)

But if I'm right about this, shouldn't NetAccess have a static flag that prevents
multiple concurrent invocations ?

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://home.clara.net/faure/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today
See http://www.kde.org/kde1-and-kde2.html for how to set up KDE 2

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

Configure | About | News | Add a list | Sponsored by KoreLogic