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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:ae9:e703:: with SMTP id m3mr15314074qka.114.1590922095190; Sun, 31 May 2020 03:48:15 -0700 (PDT) X-Received: by 2002:a05:6830:15d4:: with SMTP id j20mr12529133otr.5.1590922094949; Sun, 31 May 2020 03:48:14 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 31 May 2020 03:48:14 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=212.251.152.55; posting-account=bPTmZAoAAAC_6HP9XLKB9aAAxBa6BuOR NNTP-Posting-Host: 212.251.152.55 References: <4ed8fa1e-0b4d-4d6b-bc36-0236f6965db0@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Contracts for protected objects: internal call cannot appear in precondition of protected operation From: reinert Injection-Date: Sun, 31 May 2020 10:48:15 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:58898 Date: 2020-05-31T03:48:14-07:00 List-Id: Thanks, Got it :-) reinert fredag 29. mai 2020 04.11.49 UTC+2 skrev Randy Brukardt f=C3=B8lgende: > That's not allowed, as it would require extra mutual exclusion. Since tha= t=20 > exclusion would have to be separate from the protected action (necessary= =20 > since the entry may not be open when the call is made), you'd also have a= =20 > race condition (the precondition could be evaluated with one value, the= =20 > value then changed, and then later the entry accepted). Best practices is= =20 > always that preconditions should only depend on the parameters to a call= =20 > (regardless of the kind of call involved). >=20 > Randy. >=20 > ....