niebres@mct-1.UUCP (Caroline Niebres) (05/08/91)
Sorry, if you already saw this! We've been having trouble with mailing! Is the Xt mainloop driven by the O.S., ( the process is switched out when there no events pending ), or is it simply a loop which repeatly checks for events, timeouts, etc? The reason I ask is that we have a situation where X applications on our systems need to handle asynchronous requests from our Run Time Library. These requests are to cause the X application to perform some application dependent functions which can change values displayed, pop up widgets, etc. We tried to implement this async. function through a Unix signal handler, with flaky results. I have since been told that the Xlib isn't reentrant, and that signal handlers must not perform any X manipulations. The recommended method of detecting these aysnc. requests, was to inspect a flag within our mainloop, and call the function from there. While this method would work, our thought was to find some method that was driven by the O.S., so that our applications would not be consuming processor time continually inspecting this flag and polling for events. However, if the Xt mainloop is simply a loop continually inspecting the event queue, then this method is really no worse than what is already happening without us knowing. We use X11R3, motif 1.0, Interactive Unix 2.02. Please send responses to: Dan Thurk Micro Component Technology uunet!mct-1.com!thurk (612) 482-5356 NOTE: I do not get this mailing list.