comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: set_index and and end_of_file with just a stream reference
Date: Sat, 20 Feb 2021 19:56:33 -0600	[thread overview]
Message-ID: <s0sekj$pag$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: s0rbv0$dss$1@gioia.aioe.org

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message 
news:s0rbv0$dss$1@gioia.aioe.org...
> On 2021-02-20 16:26, Mehdi Saada wrote:
>> In term of design, I have a file inside a protected type, to ensure 
>> validity for concurrrent readings/writings.
>
> This is illegal ARM 9.5.1 (8)

Formally, it is legal, but it isn't required to work - it might raise an 
exception if you do it. It can be made illegal in Ada 202x by setting 
Nonblocking => True on the protected type (that would have been better as 
the default from a programming perspective, but it would break a lot of 
existing code).

> Use a mutex (based on a protected object) or a monitor (based on a task) 
> for mutually exclusion of blocking operations.

Right.

                         Randy. 


      parent reply	other threads:[~2021-02-21  1:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-20 15:26 set_index and and end_of_file with just a stream reference Mehdi Saada
2021-02-20 15:35 ` Mehdi Saada
2021-02-20 16:01   ` Simon Wright
2021-02-20 16:04 ` Dmitry A. Kazakov
2021-02-20 16:22   ` Mehdi Saada
2021-02-20 16:30     ` Mehdi Saada
2021-02-20 17:59       ` Dmitry A. Kazakov
2021-02-20 19:08         ` Mehdi Saada
2021-02-20 21:41           ` Simon Wright
2021-02-21  0:22           ` Dmitry A. Kazakov
2021-02-23 17:21           ` Shark8
2021-02-23 17:56           ` J-P. Rosen
2021-02-20 17:52     ` Dmitry A. Kazakov
2021-02-21  1:56   ` Randy Brukardt [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