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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e2e6547249e6f9d1 X-Google-Attributes: gid103376,public From: Samuel Tardieu Subject: Re: How to wait for task completion Date: 1996/09/17 Message-ID: #1/1 X-Deja-AN: 181085204 sender: tardieu@gargantua.enst.fr references: <01bba2e8$c45aad90$35208b82@wd> <01bba3f7$ee398fe0$10208b82@wd> to: "wiljan" content-type: text/plain; charset=iso-8859-1 organization: TELECOM Paris mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-09-17T00:00:00+00:00 List-Id: >>>>> "wiljan" == wiljan writes: wiljan> In my case I want to wait for task completion, Not until it is wiljan> almost completed. The code that has to wait for the task wiljan> completion want to clean up resources when that task is wiljan> terminated. If these resources are cleaned up before that, it wiljan> will certainlly lead to erroneous execution. In my case I want wiljan> to clean up the task object itself by using wiljan> ada.unchecked_deallocation. So you should have a look at the generic package Ada.Task_Attributes: it lets you attach special attributes onto task running on your system. If you attach an attribute of a controlled type to your task, then it will be destroyed (this the Finalization procedure called) whenever the task is completed. Sam -- Samuel Tardieu -- sam@ada.eu.org