comp.lang.ada
 help / color / mirror / Atom feed
From: Marius Amado Alves <amado.alves@netcabo.pt>
To: comp.lang.ada@ada-france.org
Subject: Re: task time-out&abort
Date: Wed, 29 Jun 2005 01:32:25 +0100
Date: 2005-06-29T01:32:25+01:00	[thread overview]
Message-ID: <mailman.111.1120005188.17633.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: <wccr7emgoda.fsf@shell01.TheWorld.com>


On 28 Jun 2005, at 22:31, Robert A Duff wrote:

> Marius Amado Alves <amado.alves@netcabo.pt> writes:
>
>>> My goal is that the calling process can abort the call after x second
>>> if the computation of the entry take too much time.
>>
>> Curiously enough on 2001 I wrote this for an Ada-Europe workshop on
>> exceptions:
>>
>> <<
>> The time-out situation is so common that perhaps it deserves a special
>> device in a future Ada:
>>
>>    begin
>>      ...
>>    end in 10.0; -- end in 10 seconds, or raise Time_Out
>>    exception
>>      when Time_Out => ...
>>>>
>> (http://www.liacc.up.pt/~maa/files/ehada1.pdf)
>
> How is this better than ATC (select-then-abort) in Ada 95?
>
> Note that dynamically nested time-out regions won't work
> very well in the above.  You need a distinct new exception
> for each time-out, and you need to prevent hijacking of the
> exception.

Sure. Indeed I seem to remember that a major conclusion of the workshop 
was that ATC in Ada 95 was indeed a very good thing or at least good 
enough and this was in great part responsible for dropping most of the 
proposals for extension. Anyway, the above was just a (drafty like 
hell) specific idiom for the time-out situation, and for 'leaf' parts 
of the program. Even so, together with another proposal I made in the 
paper, namely that on the handler you could inspect where the exception 
came from, it could work also for dynamic scopes. But as indicated this 
is completely academic now.




  reply	other threads:[~2005-06-29  0:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-22 18:08 task time-out&abort e.coli
2005-06-22 18:40 ` Dmitry A. Kazakov
2005-06-23 10:11   ` e.coli
2005-06-23 10:59     ` Dmitry A. Kazakov
2005-06-22 19:44 ` Mark Lorenzen
2005-06-23  1:44 ` Steve
2005-06-23 15:26 ` e.coli
2005-06-23 17:01   ` e.coli
2005-06-24 11:42     ` Marius Amado Alves
2005-06-28 21:31       ` Robert A Duff
2005-06-29  0:32         ` Marius Amado Alves [this message]
2005-06-29 20:52   ` Robert A Duff
2005-07-18 16:11     ` Robert I. Eachus
replies disabled

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