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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME 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: "wiljan" Subject: Re: How to wait for task completion Date: 1996/09/16 Message-ID: <01bba3f7$ee398fe0$10208b82@wd>#1/1 X-Deja-AN: 180940025 references: <01bba2e8$c45aad90$35208b82@wd> organization: Philips Electronics N.V. newsgroups: comp.lang.ada Date: 1996-09-16T00:00:00+00:00 List-Id: Samuel Tardieu wrote in article ... > >>>>> "Wiljan" == wiljan writes: > > Wiljan> Is there a simply way to wait until a task has completed in > Wiljan> Ada? > > Assuming you are referring to Ada 95, you may well associate a > protected type with each task which will have two entries: one called > by the task just before it dies, the other one blocking until the > first one is called (and non-blocking if the first entry has > already been called). > In my case I want to wait for task completion, Not until it is almost completed. The code that has to wait for the task completion want to clean up resources when that task is terminated. If these resources are cleaned up before that, it will certainlly lead to erroneous execution. In my case I want to clean up the task object itself by using ada.unchecked_deallocation. Wiljan