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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3ccb707f4c91a5f2 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Unbounded strings (Was: Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation)) Date: 1996/11/25 Message-ID: #1/1 X-Deja-AN: 198609168 references: organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-11-25T00:00:00+00:00 List-Id: In article , Franco Mazzanti wrote: >Only if we make use of the version of "Standard_Output" which returns a >"File_Access" object, then in two concurrent calls of > > Put_Line (Standard_Output.all, "xxxx"); > >we would really use a shared variable. > >However, even in this case, the erroneousnees is not clearly implied by the >reference manual because the File_Type argument has mode IN. So, we have >sharing, but this sharing is safe because it is "read only". One reason I object to this point of view is efficiency: It forces the implementation to do some sort of locking inside Text_IO. (In addition to whatever the operating system does, I mean.) But I need to do some sort of locking in the program, too, because if I have two tasks writing to the same file, I'm going to want to control the granularity of interleaving. So the locking with Text_IO is useless for a real program. - Bob