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

List:       kde-devel
Subject:    Re: Multithreaded application development
From:       Aurelien Gateau <aurelien.gateau () free ! fr>
Date:       2001-06-17 8:27:25
[Download RAW message or body]

Thanks to all of you for your answers.

From what I read, I understood that qt-mt is definitely a no-no and that I 
should try to avoid threads if possible. Even if I think threads are nice in 
some situations, since I believe they allow the program to use a more natural 
design (But I must confess to Waldo that I'm an evil coder who indents with 
tabs ;-> )
If I have to use threads I will wrap them in my own class like Charles said.

To get deeper in my problem, I'm the developer of Gwenview, one of the 
thousands KDE image viewers available out there :o) and I'm in the process of 
changing my thumbnail generation to be non-blocking. Whenever new file items 
are inserted (I use KFile), an empty thumbnail is generated and the 
KFileViewItem is added to a QQueue, waiting for my QTimer event to process it.
This works quite well, but it often crashes whenever I try to alter my 
thumbnail view dock layout (Yes, I'm using KDockMainWindow).
What the QTimer event does is :
- Load the image
- Resize it
- Paint it on the icon view item
- Ask the icon view item to repaint

Any idea to avoid crash ?

Regards,
  Aurélien

>> 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