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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c3c4ae45442f569e X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!o13g2000cwo.googlegroups.com!not-for-mail From: "fabio de francesco" Newsgroups: comp.lang.ada Subject: Re: Ada.Text_IO and protected objects (Was: [newbie question] tasks and protected types) Date: 29 Apr 2005 14:57:21 -0700 Organization: http://groups.google.com Message-ID: <1114811841.250745.71870@o13g2000cwo.googlegroups.com> References: <1114747457.868019.93210@f14g2000cwb.googlegroups.com> <42720DCD.6030304@mailinator.com> <4272260d$0$30463$ba620e4c@news.skynet.be> NNTP-Posting-Host: 80.181.52.213 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1114811849 28593 127.0.0.1 (29 Apr 2005 21:57:29 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 29 Apr 2005 21:57:29 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: o13g2000cwo.googlegroups.com; posting-host=80.181.52.213; posting-account=Lp02jQ0AAABMd3TAghNf0TM2YBZqD_JE Xref: g2news1.google.com comp.lang.ada:10839 Date: 2005-04-29T14:57:21-07:00 List-Id: Egil H. H=F8vik wrote: > "Jacob Sparre Andersen" wrote in message > news:m2acnhn43i.fsf_-_@hugin.crs4.it... > > Adrien Plisson wrote: > > > Jacob Sparre Andersen wrote: > > > > > > If calls to Ada.Text_IO _are_ potentially blocking operations, > > > > that means that one has to move the calls to a task. > > > > > RM 9.5.1(18): > Certain language-defined subprograms are potentially blocking. In > particular, the subprograms of the language-defined input-output > packages that manipulate files (implicitly or explicitly) are potentially > blocking. > > > > > > I thought entries of protected objects also were "protected actions". > > Unfortunately RM 9.5.1 isn't so clear on that question, that I am sure > > if that is actually the case or not. > > > > RM 9.5.3(8): > ... For a call on an entry of a protected object, a new protected action > is started on the object (see 9.5.1). > > > ~egilhh Thank you all for every insight on the subject. Anyway I don't yet understand whether you mean that potentially "blocking" subprograms should be put in a protected object or inversely they shouldn't. In this thread I've been suggested to put the IO in a protected object. Is it needed to do so? What do you mean by "blocking"? I suppose you mean that OS can put that process in a wait queue and switch to a new one, may be because the first is waiting for some event like device IO. Is it correct? Ciao, fabio de francesco