comp.lang.ada
 help / color / mirror / Atom feed
From: reinert <reinkor@gmail.com>
Subject: Re: Contracts for protected objects: internal call cannot appear in precondition of protected operation
Date: Sun, 31 May 2020 03:48:14 -0700 (PDT)
Date: 2020-05-31T03:48:14-07:00	[thread overview]
Message-ID: <c82ca69c-4f96-4929-bfd0-bcbdff73d6ea@googlegroups.com> (raw)
In-Reply-To: <rapr13$673$1@franka.jacob-sparre.dk>

Thanks, Got it :-)

reinert

fredag 29. mai 2020 04.11.49 UTC+2 skrev Randy Brukardt følgende:
> That's not allowed, as it would require extra mutual exclusion. Since that 
> exclusion would have to be separate from the protected action (necessary 
> since the entry may not be open when the call is made), you'd also have a 
> race condition (the precondition could be evaluated with one value, the 
> value then changed, and then later the entry accepted). Best practices is 
> always that preconditions should only depend on the parameters to a call 
> (regardless of the kind of call involved).
> 
>                         Randy.
> 
> ....

      reply	other threads:[~2020-05-31 10:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-24  5:27 Contracts for protected objects: internal call cannot appear in precondition of protected operation reinert
2020-05-29  2:11 ` Randy Brukardt
2020-05-31 10:48   ` reinert [this message]
replies disabled

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