gtk and xlib side-by-side
- From: Stefan Holst <mail s-holst de>
- To: gtk-list gnome org
- Subject: gtk and xlib side-by-side
- Date: Tue, 13 Jul 2004 02:33:56 +0200
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 s-holst de | www.s-holst.de |
+-----------------+----------------+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]