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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: confusion about message passing between the tasks Date: Sat, 25 Oct 2014 15:11:20 +0100 Organization: A noiseless patient Spider Message-ID: References: <8b3e6eef-bb3d-440a-a6d1-5bca49c2dc36@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="71797db6fbf0039ebda7a9c799ddb33f"; logging-data="10062"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX181agNuvwqBvh2lhK/SuVz2rvw8xV1pDyo=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:CGrijPGJ8Z/v9Ix7qZj/S7U03Rs= sha1:S7xOoHQdgJap/t8iiuKCkDOlR4c= Xref: news.eternal-september.org comp.lang.ada:22728 Date: 2014-10-25T15:11:20+01:00 List-Id: compguy45@gmail.com writes: > Why are you passing task as parametar? I assume you mean task type T (Next : T_Access) is ? (it would help if you quoted _some_ context) I can see why you might think of that as a parameter, but in Ada the word is "discriminant". Next *either* designates (contains a pointer to) the "next" task in the chain of tasks, the one whose entry _this_ task is supposed to call when it's done, *or* is null, in which case _this_ task is the last in the chain; as implemented in if Next /= null then Put_Line ("kicking off next task"); Next.Start (Data + 1); else Put_Line ("no next task"); end if; The task has to have some way of knowing which, if any, task it's supposed to let know that it's finished.