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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3cfaa627fc3366de X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!fq4g2000vbb.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: Task origin track from a class Date: Tue, 12 Jul 2011 17:36:29 -0700 (PDT) Organization: http://groups.google.com Message-ID: <024dd037-7c8f-460a-8ec4-0bf2456435ee@fq4g2000vbb.googlegroups.com> References: <4o0rnqqqec1s$.19h46xsbjbku2.dlg@40tude.net> NNTP-Posting-Host: 24.230.151.194 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1310517389 13051 127.0.0.1 (13 Jul 2011 00:36:29 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 13 Jul 2011 00:36:29 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: fq4g2000vbb.googlegroups.com; posting-host=24.230.151.194; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20187 Date: 2011-07-12T17:36:29-07:00 List-Id: On Jul 12, 5:31=A0am, Simon Wright wrote: > Simon Wright writes: > > "Dmitry A. Kazakov" 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.