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,19ad05fdbf4e671f,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g49g2000cwa.googlegroups.com!not-for-mail From: "Gene" Newsgroups: comp.lang.ada Subject: Deallocating records with task type fields. Date: 9 Dec 2005 14:49:14 -0800 Organization: http://groups.google.com Message-ID: <1134168554.826805.70690@g49g2000cwa.googlegroups.com> NNTP-Posting-Host: 129.29.227.4 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1134168559 16438 127.0.0.1 (9 Dec 2005 22:49:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 9 Dec 2005 22:49:19 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g49g2000cwa.googlegroups.com; posting-host=129.29.227.4; posting-account=ZFTPUQ0AAABW8AYEou9RtrBd-zTxz0_y Xref: g2news1.google.com comp.lang.ada:6804 Date: 2005-12-09T14:49:14-08:00 List-Id: Please consider these declarations for a task with some task local data: type Listener_Type; task type Listener_Task_Type(Env : access Listener_Type); type Listener_Type is record Port : Positive; Executive : Listener_Task_Type(Listener_Type'Access); end record; With this, the executive task has access to the task local environment exemplified here by a port number. Here are the questions: 1. Is this a good idiom for implementing task local data, or is there some other preferable method? 2. As I read the ALRM it is incorrect to deallocate a Listener_Type object until the Executive task has exited. What is a good idiomatic way for the Executive to deallocate its own task local storage just before it exits and without causing a race condition? [The only ways I can come up with seem like excessive machinery.] Thanks in advance.