Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!inria!mirsa!daniel From: daniel@mirsa.inria.fr (Daniel Dardailler) Newsgroups: comp.windows.x Subject: Re: XSelectNextEvent() Message-ID: <137@mirsa.inria.fr> Date: 10 Mar 89 09:20:25 GMT Reply-To: daniel@mirsa.inria.fr (Daniel Dardailler) Organization: Bull Research Center. Sophia Antipolis. France Lines: 51 DL> is David D. Levine. DD>> is me. Thanks for your comments, David. DD>> I want to wait for X events from more than one X server. DD>> (it's for a communication program named xtalk, which act DD>> basically like the unix-talk but with the X protocol and DD>> windows/mouse convenience: independent window, drawing facility, DD>> talk with several persons...) DL> I'd say that this application is a good candidate for DL> multi-processing. Several processes was my first implementation. I only ask xpert for an other possible solution with a centralysing one. DL> You have two asynchronous event sources. If you DL> try to deal with them both in one (synchronous) process, you will DL> either spend a lot of time in pointless looping (which is expensive of DL> CPU time) or block on one event source while ignoring input on the DL> other (which increases response time). It seems to me that the X server (itself :-) is "one (synchronous) process" waiting for MANY "asynchronous event sources". What do you do with the IPC select call? The real problem is in fact that after the select call, I have problems for reading a given number of events. Open issue. DL> I'd suggest you fork() two DL> processes, one to watch each display, which communicate with each DL> other via pipes or shared memory. I prefer to return to my first idea and have several independent processes communicating with SendEvent requests. So they don't have to wait from another socket than the X server one. DL> This solution has nothing to do with X, really, but it's the best one DL> I can think of offhand... If I can (and I can) build my program with no other network protocols than the X Window System Protocol-V11, it will be portable on ALL X11 platform. Any other RPC mecanisms dealing with the same number of OS is welcome. Daniel Dardailler | Email : daniel@mirsa.inria.fr BULL Centre de Sophia Antipolis | Phone : (33) 93 65 77 71 2004, Route des Lucioles | Telex : 97 00 50 F 06565 Valbonne CEDEX France | Fax : (33) 93 65 77 66 |