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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,385c146dd3112519 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!b7g2000yqd.googlegroups.com!not-for-mail From: "mkasun@gmail.com" Newsgroups: comp.lang.ada Subject: Re: Private or public task ? Date: Tue, 9 Feb 2010 15:38:01 -0800 (PST) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 209.29.4.43 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1265758681 10352 127.0.0.1 (9 Feb 2010 23:38:01 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 9 Feb 2010 23:38:01 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b7g2000yqd.googlegroups.com; posting-host=209.29.4.43; posting-account=7mZqfgoAAAAQiWGP9i-RL9CeuiuLlheF User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:9056 Date: 2010-02-09T15:38:01-08:00 List-Id: On Feb 5, 4:38=A0pm, "Jeffrey R. Carter" wrote: > Hibou57 (Yannick Duch ne) wrote: > > > So I wanted to solve this, and added a protected object providing an > > Put procedure which was displaying the same message, all three > > statement in an atomic procedure. > > Technically this is a bounded error: Ada.Text_IO.Put* operations are pote= ntially > blocking, and should not be called from a protected operation. > > > Later, I advised the task may terminates while some potential clients > > may still be alive, or even the task may terminates before any client > > had time to make any first request. > > This should not happen. Did you actually experience this? > > -- > Jeff Carter > "He didn't get that nose from playing ping-pong." > Never Give a Sucker an Even Break > 110 Why do people insist that Ada.Text_IO.Put routines are potentially blocking. >From the ARM Discussion: {AI95-00178-01} Any subprogram in a language-defined input- output package that has a file parameter or result or operates on a default file is considered to manipulate a file. An instance of a language-defined input-output generic package provides subprograms that are covered by this rule. The only subprograms in language- defined input-output packages not covered by this rule (and thus not potentially blocking) are the Get and Put routines that take string parameters defined in the packages nested in Text_IO.