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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,c33f8f65997c21d0 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.105.2 with SMTP id gi2mr517131wib.4.1348939270933; Sat, 29 Sep 2012 10:21:10 -0700 (PDT) Path: q11ni98957637wiw.1!nntp.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newspeer1.nac.net!news.mi.ras.ru!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Problem with task component Date: Mon, 24 Sep 2012 15:17:19 +0100 Organization: A noiseless patient Spider Message-ID: References: <1667b8e2qt7ei$.1gg1h3hrp9amz$.dlg@40tude.net> <187uk10m6z8xj.yr1cpbgrdur$.dlg@40tude.net> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="5f22ba276a4b4f77c63ae2949e7306f1"; logging-data="6087"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/QQiYeip8EZDqSCowIRLDoRKuhnw1uRYg=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (darwin) Cancel-Lock: sha1:5mLF8ZK7otj8nSBi9tsvXagIWbI= sha1:9+8woNf3HhtbRzZOR0v+6Ezx2RU= Content-Type: text/plain Date: 2012-09-24T15:17:19+01:00 List-Id: "J-P. Rosen" writes: > The principle of the "terminate" is that a task terminates > automatically if it can be proven that its entries cannot be called. If that's the case, why do we need to say so?! I asked earlier whether a select with an accept/terminate body would behave as I wanted, and wrote this: procedure Termination is task type T is entry Stop; end T; type R is limited record The_T : T; end record; task body T is begin loop select accept Stop; or terminate; end select; end loop; end T; The_R : R; begin null; end Termination; which does indeed manage to run to completion and return to the command line. On thinking about it, I can see that a whole class of toy programs that demonstrate tasking would have to replace the 'null;' body above with 'delay 1_000_000.0;' if the language worked the way I had hoped. Until about 10 years ago, my main procedures were exactly like that!