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!news.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Tasking without Protected Objects. Date: Tue, 31 Jan 2017 17:47:14 +0100 Organization: A noiseless patient Spider Message-ID: References: <095bc904-c60a-4521-a1a2-8f8b095a4b53@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 31 Jan 2017 16:45:40 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="781cbe42c5118313aca6102ccf4ca9aa"; logging-data="28774"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+TWd1inhBTLpXnqiEx0+vj" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 In-Reply-To: <095bc904-c60a-4521-a1a2-8f8b095a4b53@googlegroups.com> Cancel-Lock: sha1:b9uf9NJPqCXQN4SzDJPyeWBPkSs= Xref: news.eternal-september.org comp.lang.ada:33221 Date: 2017-01-31T17:47:14+01:00 List-Id: Le 31/01/2017 à 15:33, patrick@spellingbeewinnars.org a écrit : > I don't think I need very complex tasking. I don't think I need one > task to call another, I just need the main task/thread to communicate > with the other tasks. Rendezvous are a nice way to communicate between tasks. It was the only way in Ada83, but it's still very convenient when tasks want to talk to each other. If you communicate through global variables, you'll still need a basic synchronization for the main task to know when the data is available. This could be as simple as including the server tasks in a block statement: when the main program leaves the block, the local tasks are necessarily terminated, and therefore data are stable. -- 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