comp.lang.ada
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@metronet.com>
Subject: Re: is there a 'wait' command in Ada
Date: 1996/12/02
Date: 1996-12-02T00:00:00+00:00	[thread overview]
Message-ID: <m2hgm4vnzz.fsf@metronet.com> (raw)
In-Reply-To: Pine.SOL.3.91.961129204410.12801A-100000@sirius


kilgallen@eisner.decus.org (Larry Kilgallen) writes:

> 
> In article <dewar.849498825@merv>, dewar@merv.cs.nyu.edu (Robert Dewar) writes:
> > Mike said
> > 
> > "GNAT, for better or worse, links in delay - even a simple delay in a
> > non-tasking program - as part of the tasking runtime. Because of the
> > unfriendly relations between tasking and GDB, programs that use
> > simple delays don't work under our scripts. We've ended up writing
> > a package called Sleep_Package, which exports a procedure Sleep
> > that just uses a simple Unix sleep call. That works fine, but the
> > students scratch their heads about why they have to change their code
> > because the Ada in the book doesn't behave as advertised.
> > 
> > Well, Robert, you asked the question, so I had to answer it.:-)"
> > 
> > 
> > 
> > Ah ha! "don't work under our scripts", so just possibly this is a Feldman
> > scriopt issue and not a fundamental Ada issue :-)
> 
> Sounds to me like a debugger issue.
> 
> Larry Kilgallen

This has bugged me since I started using GNAT.  If you use a delay,
you get a multi-threaded application.  There is no way around it that
I have found.  It is not a debugger issue (although a multi-threaded
debugger would be useful).  There are other side-effects, too.  Under
Linux, if you add a delay you will no longer be able to stop your
application with a ^C.

The delay could just call usleep or select to do its job (which should
work under threads), but instead it uses the thread package sleep
routines.  There is probably a reason for this, but it is rather
inconvenient.

-- 
Corey Minyard               Internet:  minyard@metronet.com
  Work: minyard@nortel.ca       UUCP:  minyard@wf-rch.cirr.com
-- 
Corey Minyard               Internet:  minyard@metronet.com
  Work: minyard@nortel.ca       UUCP:  minyard@wf-rch.cirr.com




  parent reply	other threads:[~1996-12-02  0:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-29  0:00 is there a 'wait' command in Ada ***** LOTUS *****
1996-11-29  0:00 ` Robert A Duff
1996-11-30  0:00 ` Michael Feldman
1996-11-30  0:00   ` Robert Dewar
1996-12-01  0:00     ` Michael Feldman
1996-12-01  0:00       ` Robert Dewar
1996-12-02  0:00         ` Michael Feldman
1996-12-02  0:00         ` Larry Kilgallen
1996-12-02  0:00       ` David C. Hoos, Sr.
1996-12-09  0:00         ` Fergus Henderson
1996-12-02  0:00 ` Corey Minyard [this message]
1996-12-03  0:00   ` Larry Kilgallen
1996-12-03  0:00     ` Michael Feldman
1996-12-04  0:00       ` Larry Kilgallen
1996-12-03  0:00   ` Michael Feldman
1996-12-03  0:00   ` Robert A Duff
1996-12-03  0:00 ` Corey Minyard
1996-12-04  0:00   ` Keith Thompson
1996-12-04  0:00   ` Robert Dewar
1996-12-10  0:00 ` Robert I. Eachus
  -- strict thread matches above, loose matches on Subject: below --
1996-11-29  0:00 tmoran
replies disabled

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