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: 103376,534dd301375921ac X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.234.38 with SMTP id ub6mr3580649pbc.2.1339706649418; Thu, 14 Jun 2012 13:44:09 -0700 (PDT) Path: l9ni51137pbj.0!nntp.google.com!news2.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: awdorrin Newsgroups: comp.lang.ada Subject: Re: Is Text_IO.Put_Line() thread-safe? Date: Thu, 14 Jun 2012 13:37:41 -0700 (PDT) Organization: http://groups.google.com Message-ID: <546fc310-c898-417a-9c92-a5b12ef32591@googlegroups.com> References: <93201f1a-d668-485e-83b4-492bc283f36e@googlegroups.com> NNTP-Posting-Host: 192.35.35.34 Mime-Version: 1.0 X-Trace: posting.google.com 1339706649 11927 127.0.0.1 (14 Jun 2012 20:44:09 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 14 Jun 2012 20:44:09 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=192.35.35.34; posting-account=YkFdLgoAAADpWnfCBA6ZXMWTz2zHNd0j User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-06-14T13:37:41-07:00 List-Id: On Thursday, June 14, 2012 2:24:49 PM UTC-4, Robert A Duff wrote: > > I'm not that worried about the corruption in the Put_Line itself, what > > I'm worried about is if the corruption will go both ways, meaning > > could it corrupt the record array that is being sorted. (Like the text > > string being printed ending up in the middle of a data record.) >=20 > I'm not sure what you mean by that, but if you don't do proper > synchronization, it's erroneous, which means anything could > happen, including corruption of arbitrary data. That is what I mean, if the Text_IO.Put_Line isn't thread-safe, and its pic= king up data from the array being sorted in the other thread, and printing = it, then it very well could have written the information it was supposed to= be printing to the screen, into that array that was being sorted... Anythi= ng could be corrupted. I really cannot believe that the Put_Line's aren't thread safe.