From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,98caa5b030058ecf X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-11-04 13:31:45 PST Newsgroups: comp.lang.ada Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!jabba.fdn.org!uunet!ois!beckwb From: beckwb@ois.com (R. William Beckwith) Subject: Re: Say it isn't so! (Formerly: Ada replacements for DOS I/O) Message-ID: Organization: Objective Interface Systems, Inc. X-Newsreader: TIN version 1.2 PL2 References: <2EB14997@SMTPGATE2.STRATCOM.AF.MIL> Date: Sat, 5 Nov 1994 03:04:33 GMT Date: 1994-11-05T03:04:33+00:00 List-Id: Bennett, Chip (KTR) ~U (BennettC@J64.STRATCOM.AF.MIL) wrote: : We use SunAda (aka Verdix) with Motif. Does this mean that if an : application is drawing to the screen and number crunching at the same time : in a separate Ada task, that the "background" task is going to be suspended : for the same I/O interrupts that the "foreground" task is being suspended? If you are on SunOS 4.1.3, a blocking I/O will stop your entire process. Xt (called by Motif) does a Unix select call on the file descriptors for connections to the displays. This stops the process. This is why we went to so much trouble in Screen Machine to run the Motif code in a separate process. There are a couple of rules to follow (if you're not using Screen Machine ;-) that will help: 1. Poll for events by calling XtAppPending to check if an event exists before calling XtAppNextEvent 2. only call Xlib/Xt/Motif from one task, 3. pray Dan Heller's Motif book (O'Reilly) has a real nice chapter on using Unix signal handlers with Motif. It is a very nice discussion of threading with Motif. BTW, OSF is probably not going to make Motif thread safe anytime soon (if at all). : Does everyone else consider this acceptable, or am I the only one that is : appalled? It's ugly, but not Ada's fault. Some O/S's (IRIX, Solaris, OSF/1, OpenVMS/AXP, Win NT, Lynx, et al) have finally caught up to Ada. Ada did multi-threading before the O/S's, GUI's, etc. could really handle it. ... Bill -- e-mail: Bill.Beckwith@ois.com | Team Ada Objective Interface Systems, Inc. | dist, full O-O 1895 Preston White Drive, Suite 250 | multithreading Reston, VA 22091-5448 U.S.A. | built in