thread problem

"drhammerit" <[email protected]>
Newsgroups gmane.comp.video.gimp.windows.devel
Message-ID <[email protected]>
Hello,  
       my program use two thread, one stay in gtk_main() and the 
other receive data from the net and draw somo control on the main 
window. 


void my_main_loop()
{

  // Init thread and gtk 
  ....

  // Create main window
  ....

  g_thread_create(mythread....)

  gdk_threads_enter();
  gtk_main();
  gdk_threads_leave();

}


gpointer my_thread(gpointer)
{
  
  for(;;) {
 
   ....
   sm = select(...);

   if (FD_ISSET(......)) {
 
    gdk_threads_enter();

    // Process data and draw/update some control
    ....

    gdk_threads_leave();

   }

  }

}

Under linux and gtk-2.0 all is ok and work soo good. Under Win2000 
SP2 all go wrong. I have a dead-lock : the main thread is stopped in 
a function called by gtk_main() in USER32.DLL; the secondary thread 
is stopped to gdk_threads_enter()

Anyone can help me ? There is a problem with the gtk-2.0 ? or i am 
wrong ?

Hello
      dr hammer
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.