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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9cb6352457d1c6de X-Google-Attributes: gid103376,public From: Corey Minyard Subject: Re: is there a 'wait' command in Ada Date: 1996/12/02 Message-ID: #1/1 X-Deja-AN: 202005214 sender: minyard@wf-rch references: organization: Wonderforce Research newsgroups: comp.lang.ada Date: 1996-12-02T00:00:00+00:00 List-Id: kilgallen@eisner.decus.org (Larry Kilgallen) writes: > > In article , 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