comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Task origin track from a class
Date: Wed, 13 Jul 2011 09:31:47 -0700 (PDT)
Date: 2011-07-13T09:31:47-07:00	[thread overview]
Message-ID: <3790e1e7-ab81-47a0-8d21-e9dda147d905@n5g2000yqh.googlegroups.com> (raw)
In-Reply-To: 13h82glc3htf0.1sjzw91gfndbf$.dlg@40tude.net

On Jul 13, 2:41 am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:
> On Tue, 12 Jul 2011 17:36:29 -0700 (PDT), Shark8 wrote:
> > On Jul 12, 5:31 am, Simon Wright <si...@pushface.org> wrote:
> >> Simon Wright <si...@pushface.org> writes:
> >>> "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> writes:
>
> >>>> So the unfortunate rule of the thumb is: never use task components,
> >>>> but access to task instead. From Finalize you would call Stop entry or
> >>>> an equivalent and then free the task object using
> >>>> Unchecked_Deallocation.
>
> >>> With GNAT, best not to free the task object until 'Terminated is True
> >>> (GNAT's I have used would silently fail to actually free the TCB!
> >>> resulting in an insidious memory leak).
>
> >> Oops, I forgot to add that I'd aborted the task first (as Dmitry said,
> >> it's not always possible to arrange a clean shutdown).
>
> > Hm, would it be a usable idea for say the memory manager for an OS,
> > such that the requests to the manager from programs (and perhaps even
> > compilers) are delegated to the task; after all you don't want to shut
> > the memory-manager down (terminate the task) at any point in normal
> > operation.
>
> The issue has nothing to do with memory management.

You misunderstand me; I was asking that if it's generally impossible
to destroy such a construct then would the use of such a construct be
allowable (or desirable) in the cases where the destruction of such
construct is itself generally undesirable/invalid.

> The actual problems
> are:
>
> 1. The procedure of destruction of the objects having task components.
> Tasks are completed *before* Finalize is called.

Shouldn't they be completed before Finalization of the object?
And, if they are still running, shouldn't a finalize force termination?



  parent reply	other threads:[~2011-07-13 16:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-12  3:24 Task origin track from a class Rego, P.
2011-07-12  5:57 ` Simon Wright
2011-07-12  7:41 ` Dmitry A. Kazakov
2011-07-12 10:29   ` Simon Wright
2011-07-12 10:31     ` Simon Wright
2011-07-13  0:36       ` Shark8
2011-07-13  2:57         ` Rego, P.
2011-07-13  7:41         ` Dmitry A. Kazakov
2011-07-13  8:43           ` Georg Bauhaus
2011-07-13 11:59             ` Dmitry A. Kazakov
2011-07-13 16:31           ` Shark8 [this message]
2011-07-13 17:22             ` Dmitry A. Kazakov
replies disabled

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