gtk and xlib side-by-side

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

 



hi again!

thanks owen for the fast answer to my last question :)

i just ran into another problem which may be gtk-related. one thread of
my app runs

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

to run a gtk window. another thread runs an independent xlib-event-loop

  while (this->keep_going) {
      XEvent event;
      XNextEvent (this->display, &event);
      /* ... */
  }

to run some stock xlib-windows (the gtk-stuff is optional in my app, so
i want to keep the code separate). the display used in this loop was
opened by XOpenDisplay, after XInitThreads().

most of the time the whole app runs fine, but in some rare cases
XNextEvent stops receiving events and blocks. the gtk-window is still
responsive at this time. this xlib-event-loop-freeze is a sort of a 
race condition since it cannot be reproduced deterministically.

so i'm wondering, if it is theoretically possible that this race
condition is between the event-threads of gtk and xlib. i didn't managed
to reproduce this deadlock without a gtk-event-loop running.

thanks in advance for any hints.		  

-- 
RY  Stefan
+-----------------+----------------+
| mail@xxxxxxxxxx | www.s-holst.de |
+-----------------+----------------+
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux