From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 10 Aug 93 23:00:45 GMT From: eachus@mitre-bedford.arpa (Robert I. Eachus) Subject: Re: Question on tasking... Message-ID: List-Id: In article <1993Aug10.144611.23993@evb.com> jjh@evb.com (John Halper) writes: > I have a question in the following program, > procedure Main is > task type Task_Type; > type Task_Ptr is access Task_Type; > Task_Instance : Task_Type; > begin > block: > begin > Task_Instance := new Task_Type; > Task_Instance := null; > end; --> Does block wait until Task_Instance Terminates ???? > end Main; No, Main does. And now for the language lawyering...actually Main will not be left until the task instance created in the block* is completed or waiting at a terminate alternative. For tasks created by allocators, the master is the block containing the access type declaration, or in the case of library packages, the master is the environment task, which allows the main program to exit before all library tasks have completed. (See RM 9.4, especially paragraph 2 and the note in paragraph 13.) * And any dependant tasks, you didn't show us the task body... -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...