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-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: task model Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.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: <04458a0b-1e58-478b-a2f0-c47226f840ac@f16g2000yqm.googlegroups.com> <6b6bd661-06b0-4ef6-8d48-0ef97d55fdd4@f20g2000prn.googlegroups.com> Date: Sat, 17 Oct 2009 14:18:54 +0200 Message-ID: NNTP-Posting-Date: 17 Oct 2009 14:18:53 CEST NNTP-Posting-Host: ac75d47f.newsspool2.arcor-online.net X-Trace: DXC=a7T1SmYFW1D78PK[oJ2ng@A9EHlD;3YcB4Fo<]lROoRA8kF On Sat, 17 Oct 2009 13:10:04 +0200, Georg Bauhaus wrote: > "Jeffrey R. Carter" writes: > >> Georg Bauhaus wrote: >> >> What's the point of re-raising? Exceptions don't propagate from tasks. > > Uhm, I forgot to mention that a handler at some nesting level > might be reporting, permitting more accurate diagnostic messages. > It could then decide there is or is not a possible rescue, > and accordingly re-raise, for example. The problem is that there is no nesting of tasks in terms of control flow. There is a parent child relation, but it is no nesting. If an exception is propagated out of a task, the parent task is doing its things asynchronously to the child. In order to propagate an exception in the parent you have only two options: 1. an asynchronous transfer of control = in effect aborting/interrupting the parent; 2. to synchronize with the parent making a rendezvous with it. Neither looks much promising. More generally speaking in Ada tasks are objects. As an object a failed task may complain no earlier than upon its finalization if no other contacts (rendezvous) happen. This is too late in all senses. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de