[Qt-interest] Using multiple thread, GUI dumps core at exit

Scott Aron Bloom Scott.Bloom at sabgroup.com
Fri Feb 26 08:51:04 CET 2010


Most likely you are not properly stopping the and deleting the threads
correctly.

 

However, why use post events? Why not just use signals and slots?  

 

Scott

 

From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Rehan
Sent: Thursday, February 25, 2010 22:21
To: qt-interest at trolltech.com
Subject: [Qt-interest] Using multiple thread, GUI dumps core at exit

 

Hi All,

 

I have 3 huge files those I want to load in multiple threads. I used two
approaches but I have some issues in both.

 

1st approach:-

     My GUI is in main thread. I am loading all the 3 files in 3
different concurrent threads.

     I am handling postevent also, to attaches all the threads into main
thread, because I have to display the data in GUI.

     In this approach everything works fine, but while I quit GUI, it
dumps the core.

     I have verified there is no global destructor and main GUIs
destructor is also getting called only once.

     If I have only one thread instead of 3 apart from main thread, it
doesn't dumps core. 

2nd approach:

    GUI is in main thread. 

    I load first file in a separate thread, it is taking 14 sec to
complete.

    In the postevent of the previous thread, I create another thread to
load another file; it is taking approx 3 minutes to load.

    And same in second threads postevent I am creating third thread to
load my third file. It also takes approx 3 minute to load.

   

  If anyone has faced this type of issue and has some clue, please
respond.

 

Note:  While in first approach all the 3 files take 14 sec to load.

 

Regards,

Rehan

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100225/96dbd20b/attachment.html 


More information about the Qt-interest-old mailing list