threads



Ok, I've run into a small problem. Even using gdk_threads_[enter/leave],
I'm still deadlocking after a bit. Here's what I'm doing that would
prolly be relevant in the problem case:

1) a thread to load a file/update an activity bar

2a) after calling pthread_create, sitting in a 
while(thread not finished)
  gtk_main_iteration()

2b)rendering to a GL context (via gtkglarea) in a gtk_idle (note - idle
functions and while(gtk_events_pending()) dont play nice - the idle
makes it so there's always something pending, so no threads == inf. loop :)

After a few times through the thread's load loop, the whole app locks
like I forgot to release the lock. However I have verified that I release
for every aquire. Does threading not work properly with calls to
gtk_main_iteration?

Oh, and it works fine on my uniprocessor box @ home, but not the SMP
boxes in the lab :/

-- 
Slyder earendel org                  |      "Live to win, dare to fail."
Earendel / <insert here>             |                  -James Hetfield 
Sing your dreams, Scream your song   |                   /\/\etallic/-\ 




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