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

List:       kde-devel
Subject:    Re: Multithreaded application development
From:       Rik Hemsley <rik () kde ! org>
Date:       2001-06-17 3:42:34
[Download RAW message or body]

#if Charles Samuels
> On Saturday 16 June 2001 07:22 pm, Jeff brubaker wrote:
> 
> >   Does this mean that no applications included in the base distribution
> > of KDE use threads at all?
> >
> >   When i click on a link in konqueror, it is able to respond to user
> > events even as the page is loaded. Is this the same way I.E. and Netscape
> > accomplish this? I always assumed that they all  used a threading
> > based approach.
> In most cases, you can get away with using QApplication::processEvents() ( 
> kapp->processEvents() ), if you call this function, respond to any events 
> currently pending.  For example, in the KJofol skin loader in noatun, there's 
> this huge loop that takes forever to process, so I call kapp->processEvents() 
> so that the user can continue pressing buttons and such, even while it 
> continues to load the file.

Actually there's a much cleaner way to do this, and that's to use a
QTimer with timeout of 0 and have it call a slot which does the next
bit of processing. Calling processEvents() is a bit hackish.

> Well, microsoft is thread-happy, not that this is necessarily a bad thing, 
> they just go too far :)

Well, if their threading support in the OS is good, let them use as
many threads as they like.

Rik

 
>> Visit http://master.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