comp.lang.ada
 help / color / mirror / Atom feed
From: Tim McGuire <mcguire_tm2@yahoo.com>
Subject: Re: Problem with Delay Alternative in Finalization
Date: Sun, 20 May 2012 11:46:55 -0500
Date: 2012-05-20T11:46:55-05:00	[thread overview]
Message-ID: <bt7ir71stqaib1oirpade55084e79u0h9m@4ax.com> (raw)
In-Reply-To: TfydnZmSb4QJZSrSnZ2dnUVZ8nSdnZ2d@brightview.co.uk

On Sat, 19 May 2012 20:46:25 +0100, Robert Matthews
<ignore@ramatthews.free-online.co.uk> wrote:

>Dmitry A. Kazakov wrote:
>
>> On Fri, 18 May 2012 21:30:31 -0500, Tim McGuire wrote:
>> 
>>> I am running in to a problem where a delay alternive used when in
>>> finalization doesn't seem to be working properly.
>>> The delay part never seems to happen.
>> 
>> It is Program_Error to propagate an exception from Initialize, which is
>> what I think happens when you raise Lock_Timeout_Exception.
>> 
>> BTW, you can use task identification in order to allow reentrant locks.
>> 
>
>In the 2005 standard at 7.6.1 para 14.a: "It is not a bounded error for 
>Initialize to propagate an exception. If Initialize propagates an exception, 
>then no further calls on Initialize are performed, and those components that 
>have already been initialized (either explicitly or by default) are 
>finalized in the usual way."
>
>So Program Error is not raised from Initialize - though
>on general grounds it may well be best to avoid raising exceptions in
>an Initialize.
>
>Robert

I agree that raising exceptions in an Initialize isn't the best way to
do things.

However, this is the way the application was written for Solaris and I
am just porting it to Red Hat Linux.

The fact still remains that it appears that the Delay alternative is
not working properly in initialize, when compiled with GCC4.3.4.

Is there some way to fix this? Compiler switch, pragma, or maybe
upgrading compiler (i.e. newer version of GCC or GNATPRO)?





Tim



  reply	other threads:[~2012-05-20 16:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-19  2:30 Problem with Delay Alternative in Finalization Tim McGuire
2012-05-19  6:12 ` Dmitry A. Kazakov
2012-05-19 12:51   ` Tim McGuire
2012-05-19 14:04     ` Dmitry A. Kazakov
2012-05-19 19:46   ` Robert Matthews
2012-05-20 16:46     ` Tim McGuire [this message]
2012-05-20 17:01       ` Dmitry A. Kazakov
2012-05-20 20:36         ` Simon Wright
2012-05-19 17:33 ` Simon Wright
2012-05-20  6:17   ` Simon Wright
2012-05-19 20:31 ` Robert A Duff
replies disabled

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