Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!usc!snorkelwacker!bloom-beacon!eru!luth!sunic!mcsun!ukc!harrier.ukc.ac.uk!rlh2 From: rlh2@ukc.ac.uk (R.L.Hesketh) Newsgroups: comp.windows.x Subject: Re: Multiple Application Contexts Message-ID: <4588@harrier.ukc.ac.uk> Date: 8 May 90 09:19:52 GMT References: <9004261750.AA24717@expo.lcs.mit.edu> <9005071732.AA17014@lyre.MIT.EDU> Reply-To: rlh2@ukc.ac.uk (Richard Hesketh) Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 21 In article <9005071732.AA17014@lyre.MIT.EDU> swick@ATHENA.MIT.EDU (Ralph Swick) writes: >The most immediate problem >will be deciding how to multiplex events/inputs/timers across >several app contexts. Probably, you'll wind up polling using >XtAppPending() and XtAppProcessEvent(). Yup, I've tried this and its not nice. On a VAXstation I found that it was spending upto 90% of the CPU looping on XtAppPending(). I was using a Work Procedure which called a polling loop which would process up to 10 waiting events. I haven't tried using a timeout callback, would that be much better? I would like to use a separate application context because ... >I could invent a reason or two why a single process might want more >than one app context, but since Andy didn't give any details I wonder >if he found a good reason - Andy? ... My UI builder requires a separate application context so that when a user is editing a translation table in a prototype he only picks up the Action routines available to the prototype and not those used internally by the builder. Richard