comp.lang.ada
 help / color / mirror / Atom feed
From: beckwb@ois.com (R. William Beckwith)
Subject: Re: Say it isn't so! (Formerly: Ada replacements for DOS I/O)
Date: Sat, 5 Nov 1994 03:04:33 GMT
Date: 1994-11-05T03:04:33+00:00	[thread overview]
Message-ID: <CyrxvL.G8K@ois.com> (raw)
In-Reply-To: 2EB14997@SMTPGATE2.STRATCOM.AF.MIL

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



  parent reply	other threads:[~1994-11-05  3:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-10-28 18:59 Say it isn't so! (Formerly: Ada replacements for DOS I/O) Bennett, Chip (KTR) ~U
1994-10-30 15:31 ` Robert Dewar
1994-10-31 10:36 ` Rudy Zijlstra
1994-11-05  3:04 ` R. William Beckwith [this message]
  -- strict thread matches above, loose matches on Subject: below --
1994-10-31 12:51 cwarwick
1994-10-31 14:45 CONDIC
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox