Multithreading trouble
- From: "Felix E. Klee" <felix klee inka de>
- To: gtk-app-devel <gtk-app-devel-list gnome org>
- Subject: Multithreading trouble
- Date: Sat, 14 Jul 2001 21:52:03 +0200
Hi,
I wrote a mutlithreaded program which occasionally hangs. Here's an
outline of its widgets and what they do:
[StartButton] Starts a thread with pthread_create. The thread performes
a calculation and updates [SomeWidgets] from time to time
by calling the function
updateWidgets() {
gdk_threads_enter();
...
update [SomeWidgets]
...
gdk_threads_leave();
}
[QuitButton] Quits the program by setting a flag that causes the
thread to terminate itself.
[SomeWidgets]
Now, my problem is that when I press [QuitButton] while updateWidgets()
is running the program hangs. What am I doing wrong?
TIA,
Felix
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]