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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,95a195198c452b32 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Finalization of a record containing a task Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4213b899$0$20902$ba620e4c@news.skynet.be> Date: Thu, 17 Feb 2005 10:13:09 +0100 Message-ID: NNTP-Posting-Date: 17 Feb 2005 10:10:42 MET NNTP-Posting-Host: ee251833.newsread4.arcor-online.net X-Trace: DXC=@IamGN?Hhf^adj;CH1=J1P:ejgIfPPldTjW\KbG]kaMXQc4L4[MA2TP@XYl]ZkB27P[6LHn;2LCV^7enW;^6ZC`T<=9bOTW=MN^ X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:8374 Date: 2005-02-17T10:10:42+01:00 List-Id: On Wed, 16 Feb 2005 22:20:27 +0100, Adrien Plisson wrote: > Stephen Leake wrote: > >> ssh9614@hotmail.com (Bj?rn) writes: >>>I do not see how I can manage this since the ADT does not seem to >>>finalize as long as the tasks have not terminated. >> >> you need to have a 'select' statement, with an open 'terminate' >> alternative. > > alternately, since T_ADT is Limited_Controlled, you may abort the inner > task in its Finalize (!! baaad !!) No, there is no way to gracefully complete task components of upon finalization of the controlled object. The finalization model does not allow this, see Robert Duff's post. (Hypothetically, if there were class-wide destructors, one would be able to do that.) So in most cases one is forced to use access-to-task components rather than plain task ones. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de