comp.lang.ada
 help / color / mirror / Atom feed
From: Mehdi Saada <00120260a@gmail.com>
Subject: Re: time of update of new values for out mode parameters
Date: Mon, 19 Mar 2018 19:33:34 -0700 (PDT)
Date: 2018-03-19T19:33:34-07:00	[thread overview]
Message-ID: <13e52a81-4991-4361-9e1b-c9673faebaec@googlegroups.com> (raw)
In-Reply-To: <4598be4c-7a4b-4bdd-8fd3-99b943e77823@googlegroups.com>

Ok. To be honest, the use case I had in mind was a wrong one, is meant to be implemented through protected types.

let's say:
procedure FOO (A: out A_TYPE) is
... A := something; -- Can't know when it's copied back
procedure FOO2 (a: access A_TYPE) is
... A.all := something; -- Can't know for sure either, right ?
but I am sure with
until some_absolute_time; some_protected_object.Write(something);
, and another task can use it safely.
Now, about procedure FOO (A: out A_TYPE) is
... delay until some_absolute_time;
A := something; delay until the_other_hour;
I shall assume that inside FOO, A = something" (obviously), but shall not assume this for the world outside FOO ? 

  parent reply	other threads:[~2018-03-20  2:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-19 12:21 time of update of new values for out mode parameters Mehdi Saada
2018-03-19 13:10 ` Simon Clubley
2018-03-19 15:01 ` AdaMagica
2018-03-19 16:11 ` Mehdi Saada
2018-03-19 17:09   ` AdaMagica
2018-03-19 22:42 ` Randy Brukardt
2018-03-20  2:33 ` Mehdi Saada [this message]
2018-03-20  5:54   ` Simon Wright
2018-03-20 11:18     ` Mehdi Saada
replies disabled

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