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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no 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!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Fri, 29 Apr 2005 15:36:52 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <1114747457.868019.93210@f14g2000cwb.googlegroups.com> <42720DCD.6030304@mailinator.com> <4272260d$0$30463$ba620e4c@news.skynet.be> Subject: Re: Ada.Text_IO and protected objects (Was: [newbie question] tasks and protected types) Date: Fri, 29 Apr 2005 15:39:26 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4927.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-zZXd4cs+TO+U+1HspwwRbopJ6nsJ8dqa+pWTaVSyAx8680EWzLBlPgp9dFk9VacYwY/ndhs8YuN1FIV!OIU3girSm3EkIwdYjgFHVrZfwWpTEF04zO/brvU7HW2FFQy0sM3LDfDIfr743NH4jJzmU2M+Bwpt X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:10836 Date: 2005-04-29T15:39:26-05:00 List-Id: "Egil H. H�vik" wrote in message news:d4tftf$m7i$1@kda-news.kongsberg.com... > > "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. Right. We had a big fight about this rule in the ARG (some people wanting to repeal or modify it), but ultimately it was left to stand. So it isn't portable to call Text_IO from a protected object; it might raise Program_Error or deadlock. I think it actually does work in Janus/Ada and in GNAT, but (in our case at least), we aren't making any promises that that will remain the case. And its always bad practice to write code that will work only on a few compilers, especially something as hard to track down as this would be. Randy.