writing to GUI from 2+ threads
- From: ZB <zb197 yahoo com>
- To: gtk-list gnome org
- Subject: writing to GUI from 2+ threads
- Date: Mon, 25 Jun 2001 10:20:05 -0700 (PDT)
I am trying to write to the GUI from more than one
thread and it works with LINUX but not win32. I made a
stub program by modifying the threaded hello world
program (http://www.gtk.org/faq/#AEN462) from the gtk
site. The program creates a window and then starts a
thread and i modified the thread to show a second
window. In LINUX, it works great. In win32.. the
second window freezes halfway shown and the app gets
stuck.
(for win32.. i am using the DLLs posted 12/26 at
http://user.sgic.fi/~tml/gimp/win32/downloads.html)
I also downloaded the 1.3.6 GTK and compiled the
latest DLLs for windows. The same problem still
persists and the window remains half shown.
I am always using gdk_thread_enter and leave within my
thread.
My question is how do you write to the GUI from more
than one thread? I thought that the gdk_thread_enter
and leave should do the trick. Is this a bug? I did a
little reseach in the forums and found that you can
call the gtk_add_timeout function to get the window to
show. Is this the best way? Is there something
cleaner?
I can post my stub if that will help. I also tried
running a backtrace from gdb when it froze and it told
me that it could access the memory when i typed 'bt'.
Thanks,
Zev.
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]