comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Storage management
Date: Fri, 07 Nov 2008 11:54:05 +0200
Date: 2008-11-07T11:54:05+02:00	[thread overview]
Message-ID: <49140215$0$23600$4f793bc4@news.tdc.fi> (raw)
In-Reply-To: <13hpf6ht4tl2m$.1su6rgr67eb2o$.dlg@40tude.net>

Dmitry A. Kazakov wrote:
> I have a general question. Does anybody use abort
> and asynchronous transfer of control?

I do, to set a limit on the running time of a possibly lengthy 
procedure Analyse:

     select
        delay Opt.Max_Analysis_Time;
        Output.Error ("Maximum analysis time exceeded.");
     then abort
        Analyse;
     end select;

> After all, there is no chance to have them reasonably working anyway.

It seems to work for me (GNAT 3.15p), except that I had to add a 
dummy "delay 0.1" at the end of the main subprogram. Otherwise the 
program would sometimes hang indefinitely in the termination phase. 
This program has no tasks, so the abort and ATC are the only form 
of concurrency.

> How about to remove that stuff altogether and make a far more important
> finalization right and fast?

Isn't pragma Restrictions (No_Select_Statements) enough? Or is it 
too strong, and a new restriction specifically for ATC would be better?

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .



  reply	other threads:[~2008-11-07  9:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-01 11:13 Storage management Florian Weimer
2008-11-01 22:28 ` Robert A Duff
2008-11-02 14:27   ` Florian Weimer
2008-11-07  1:14     ` Randy Brukardt
2008-11-07  8:30       ` Dmitry A. Kazakov
2008-11-07  9:54         ` Niklas Holsti [this message]
2008-11-07  9:20           ` Dmitry A. Kazakov
2008-11-07 12:12             ` Niklas Holsti
2008-11-07 13:22               ` Dmitry A. Kazakov
2008-11-07 13:28                 ` Georg Bauhaus
2008-11-07 14:41                   ` Dmitry A. Kazakov
2008-11-10 14:28                 ` christoph.grein
2008-11-10 16:08                   ` Dmitry A. Kazakov
2008-11-08 11:04         ` sjw
2008-11-08 12:33           ` Dmitry A. Kazakov
2008-11-10  9:34             ` sjw
2008-11-01 22:36 ` sjw
replies disabled

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