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=unavailable autolearn_force=no version=3.4.4 Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: can someone help me with this code (explanation) Date: Thu, 25 Sep 2014 15:27:47 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <6e1f86e6-c17a-428e-bb19-460c5ba26c8a@googlegroups.com> <1ec7272d-de7f-43dd-be30-009c437011de@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Thu, 25 Sep 2014 22:27:48 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="ff2e5d21b9fb0a12a9871c15f1d89f02"; logging-data="19513"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19NKjiyG4xGLQYEBo1dSz7mw+HX7gdXpzc=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 In-Reply-To: Cancel-Lock: sha1:4Vx4OYB72UI1IeanPnqUYOqBPgQ= Xref: number.nntp.dca.giganews.com comp.lang.ada:189159 Date: 2014-09-25T15:27:47-07:00 List-Id: On 09/25/2014 01:10 PM, Niklas Holsti wrote: > > To make task-safe use of Ada.Text_IO, it should be wrapped in some way > to ensure that only one task calls it at a time. For example, you could > write a task with an entry like Put_Line (Message : in String) and an > accept statement that does Ada.Text_IO.Put_Line (Message). But a > protected-object wrapper is probably better for uses where I/O > performance (latency) is not critical. Except that I/O is potentially blocking, and so cannot appear in a protected operation, meaning one needs a task one way or another. -- Jeff Carter "Blessed is just about anyone with a vested interest in the status quo." Monty Python's Life of Brian 73