Re: Gtk+ problem with time-consuming threads
- From: Sven Herzberg <herzi gnome-de org>
- To: patkhor <indyz-fluke hotmail com>
- Cc: gtk-devel-list gnome org
- Subject: Re: Gtk+ problem with time-consuming threads
- Date: Mon, 11 May 2009 16:50:49 +0200
Am Dienstag, den 05.05.2009, 18:57 -0700 schrieb patkhor:
> I provide the user with the OK button, when user click on that button, the
> program will create some number of threads (more than 10) and each threads
> will do time-consuming work in the background. I successfully compiled my
> program, but when I click on OK button, the main window freeze (display "not
> responding" message on Windows machine).
>
> One person on this forum suggested to me (thank you very much) that I should
> make the threads unjoinable because the main thread have to wait for all
> threads to finish their execution that's why the main window freeze. So I
> eliminate all g_thread_join() but the problem still occur.
>
> Could someone please give me little sample code that provide only one
> button. When that button is clicked some number of threads will do something
> time-consuming in the background (something simple like multiplying numbers
> 10000 times in the for loop, just to give me an idea).
Did you check where your threads are blocking? (Ie. did you attach a
debugger and check each thread?)
Regards,
Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]