[Glade-users] RE: Glade-users] xlib error corba/glademm app



So with some further poking around I was able to
find that glib has hooks for thread safety.

Xlib requires only a single thread can update the
display at one time so I have to put a lock on any
operations which update the display.

The problem now seems to be one of sequencing.


1. g_thread_init() must be called prior to any
calls to windows.
(without these the calls to
gdk_threads_enter/leave probably have no effect.)


2. guard all updates.

Here is the problem I believe that I am facing.

Does the event handling loop of gtk-- (run())
block on a mutex ? If so which one? Is it the
global in gdk.h 

       gdk_threads_mutex

If so does this need initialization?

Or is this handled transparently after
g_thread_init has been called?

Is there a place where I should be reading this
rather than bothering everyone -- sample thread
safe source would be great.

Thanks in advance.

David



-- 
/^\
\ /     ASCII RIBBON CAMPAIGN
 X        AGAINST HTML MAIL  
/ \ 

Respectfully:
                                      David Walter
Karma: Whenever you are there you go. dwalter syr edu
Office: CST::1-120                    Phone: (315) 443-5811





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]