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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,3cfaa627fc3366de X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Task origin track from a class Date: Tue, 12 Jul 2011 11:29:59 +0100 Organization: A noiseless patient Spider Message-ID: References: <4o0rnqqqec1s$.19h46xsbjbku2.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx04.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="25444"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lAOpoGYrJhYUgTqItBNWGTyKAXiSFsfA=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:090yQKkR/JKEb7D0q0cdEnfuhSY= sha1:GODCcvC2JwQlFyVzqGZ33z04e6Y= Xref: g2news1.google.com comp.lang.ada:20180 Date: 2011-07-12T11:29:59+01:00 List-Id: "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).