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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a046ce7f5ee1fa51 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-03 03:33:54 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!lnsnews.lns.cornell.edu!news.litech.org!news.wind.surfnet.nl!news.nl.linux.org!humbolt.nl.linux.org!transit.news.xs4all.nl!newsfeed.xs4all.nl!xs4all!news.xs4all.nl!not-for-mail Sender: Fraser@FWILSON From: Fraser Wilson Newsgroups: comp.lang.ada Subject: Re: new_line in a put_line References: <1ec946d1.0212020657.2bd8b5c@posting.google.com> Date: 03 Dec 2002 12:33:37 +0100 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 80.126.24.12 X-Trace: 1038915233 news.xs4all.nl 11738 80.126.24.12:61650 Xref: archiver1.google.com comp.lang.ada:31370 Date: 2002-12-03T12:33:37+01:00 List-Id: mheaney@on2.com (Matthew Heaney) writes: > If you have multiple tasks writing to the same file, then you're going > to have to synchronize access to the file through some intermediary, > as a task or protected object (the latter requires care). I've seen a couple of mentions of problems using protected objects for atomic file output. What's the specific issue? I.e., why isn't this sufficient? protected File_Operation is procedure Put_Line (Text : String); end File_Operation; protected body File_Operation is procedure Put_Line (Text : String) is begin Ada.Text_IO.Put_Line (Text); end Put_Line; end File_Operation; Oh, wait on, is it something to do with 9.5.1(8)? Fraser.