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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c33f8f65997c21d0 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.180.24.135 with SMTP id u7mr3589337wif.3.1348600958546; Tue, 25 Sep 2012 12:22:38 -0700 (PDT) Path: ed8ni56093053wib.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.134.4.91.MISMATCH!news2.euro.net!news.mixmin.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Problem with task component Date: Tue, 25 Sep 2012 21:22:37 +0200 Organization: A noiseless patient Spider Message-ID: References: <1667b8e2qt7ei$.1gg1h3hrp9amz$.dlg@40tude.net> <187uk10m6z8xj.yr1cpbgrdur$.dlg@40tude.net> <1gq5enrpptnql.v7pdz1umht4a$.dlg@40tude.net> <19yadxsixu2y9$.1tfzkylgscckn$.dlg@40tude.net> Mime-Version: 1.0 Injection-Date: Tue, 25 Sep 2012 19:22:38 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="709a3b9124d052b085bf6fc3f0a2adab"; logging-data="31424"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+VyNp395CJiaGUBCTKU5hg" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 In-Reply-To: <19yadxsixu2y9$.1tfzkylgscckn$.dlg@40tude.net> Cancel-Lock: sha1:4VEwEJ7qooWryIMH/U2hXMzr6ek= X-Enigmail-Version: 1.4.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: 2012-09-25T21:22:37+02:00 List-Id: Le 25/09/2012 20:35, Dmitry A. Kazakov a �crit : > I need not to consider that. Termination of a task is normally determined > solely by its master (terminating) and its internal state (open terminate > alternative). I.e. strictly top-down. IIUC, the scheme you have in mind is a server task which, at some point, either accepts calls from its master, or delays and do some processing, but you want it to halt if the master is completed. You can write it this way: task body Server is begin loop select accept ... do ... end; or delay Time_Out; exit when not Master_Task'Callable; end select; -- do something end loop; end Server; Note that when the master completes (for whatever reason, including unhandled exception or abort), it is not terminated since it has to wait for its dependent tasks, but it is no more callable. That's why you have to check 'Callable and not 'Terminated. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr