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 autolearn=ham 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-7-bit Path: g2news1.google.com!news1.google.com!newsfeed2.dallas1.level3.net!news.level3.com!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Private or public task ? Date: Tue, 09 Feb 2010 18:51:23 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1265759469 25436 192.74.137.71 (9 Feb 2010 23:51:09 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 9 Feb 2010 23:51:09 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:aRA3Q1/deX7L9XYPjdcXf8F46xU= Xref: g2news1.google.com comp.lang.ada:9059 Date: 2010-02-09T18:51:23-05:00 List-Id: "mkasun@gmail.com" writes: > Why do people insist that Ada.Text_IO.Put routines are potentially > blocking. Because they're talking about the ones that operate on files, which are the commonly-used ones. If you say: Ada.Text_IO.Put_Line("Hello, world."); in a protected procedure, that's wrong. GNAT will often let you get away with it, but it's still wrong, because Put_Line is potentially blocking. Yes, as you quote below, the Get/Put that do parsing/formatting on strings are not blocking, as you would expect. But these are rarely used, so people forget about them. > 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. - Bob