comp.lang.ada
 help / color / mirror / Atom feed
From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: Tasking without Protected Objects.
Date: Tue, 31 Jan 2017 17:47:14 +0100
Date: 2017-01-31T17:47:14+01:00	[thread overview]
Message-ID: <o6qevj$s36$1@dont-email.me> (raw)
In-Reply-To: <095bc904-c60a-4521-a1a2-8f8b095a4b53@googlegroups.com>

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

  parent reply	other threads:[~2017-01-31 16:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 14:33 Tasking without Protected Objects patrick
2017-01-31 14:52 ` Dmitry A. Kazakov
2017-01-31 16:47 ` J-P. Rosen [this message]
2017-01-31 16:53 ` Björn Lundin
2017-01-31 17:53   ` patrick
2017-01-31 17:40 ` Jeffrey R. Carter
2017-01-31 17:55   ` patrick
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox