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.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!rjh From: rjh@cs.purdue.EDU (Bob Hathaway) Newsgroups: comp.lang.ada Subject: Re: Two Questions on tasking Message-ID: <6358@medusa.cs.purdue.edu> Date: 31 Mar 89 21:42:29 GMT References: <890331161111.20401e9f@elcc.epfl.ch> Sender: news@cs.purdue.EDU Reply-To: rjh@cs.purdue.edu (Bob Hathaway) Organization: Department of Computer Science, Purdue University List-Id: In article <890331161111.20401e9f@elcc.epfl.ch> madmats@elma.epfl.ch (Mats Weber) writes: >> 1. When an exception is raised and not handled in a task body, the task >> is terminated and the exception is not further propagated, without >> notice (11.4.1.8). Why is this? > >This is because the execution of the task is independent of its creator. According to section 9.4.1: "Each task depends on at least one master.". >If the exception were propagated to the task's creator, the exception >handler in the creator could get exceptions from all tasks he has created. >For example, if task A creates A.B, A.C and A.D and A.B raises Exception_B >and A.C raises exception Exception_C, how would the handler in A deal with >them ? >The Ada rules on exceptions state that only one exception may be active in >any thread of execution. According to section 9.3.3, if any child task does not have a handler for a raised exception, the exception TASKING_ERROR is propagated to the master upon conclusion of the activation of all sibling tasks and is propagated to the master only once for any number of concluded child tasks. What is being asserted above? Bob Hathaway rjh@purdue.edu