Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!brutus.cs.uiuc.edu!psuvax1!rutgers!mit-eddie!wonko!bloom-beacon!ATHENA.MIT.EDU!swick From: swick@ATHENA.MIT.EDU (Ralph R. Swick) Newsgroups: comp.windows.x Subject: Re: The problem of fitting your application into XtAppMainLoop. Message-ID: <8909281529.AA20151@LYRE.MIT.EDU> Date: 28 Sep 89 15:29:28 GMT References: <61@eileen.mga.com> Sender: daemon@bloom-beacon.MIT.EDU Organization: DEC/MIT Project Athena Lines: 15 I'm not aware of any portability problems with XtAppPending, so from that standpoint polling for events during your work procedure is the easiest solution. You are correct in pointing out that there are many reentrancy problems with this technique, however. Every part of the code, including the application itself, has to implement data structure locking. Xlib already supports this and some work has been done to investigate adding it to Xt and Xaw, but we've a long way to go. In a single-threaded environment, we're reasonably confident that we've addressed any reentrancy bugs in the Xt level. That is, it should be safe to call XtDispatchEvent from anywhere. The same is not necessarily true of Xaw, though I don't currently know of any specific bugs.