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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,108a618b460a8c87 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Tasking differences Date: 2000/07/12 Message-ID: <8kgkdp$kjv$1@nnrp1.deja.com>#1/1 X-Deja-AN: 645294400 References: <3969B65A.46942054@baesystems.com> <8kff0n$nnu$1@nnrp1.deja.com> X-Http-Proxy: 1.0 x72.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Jul 12 02:16:37 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-07-12T00:00:00+00:00 List-Id: In article <8kff0n$nnu$1@nnrp1.deja.com>, Ted Dennison wrote: > Hmm. That makes perfect sense, and would fully explain the > behavior. Most Ada runtimes have a little problem where > Ada.Text_IO is not thread-safe. That's misleading. Ada.Text_IO is required to be thread safe, and it would be surprising if it were not the case. Probably what you are referring to is having two tasks use Ada.Text_IO *on the same file* without any protection, but that's clearly an unsychronized use of a shared variable, so the program is erroneous. The "little problem" is in the client! > It would be fairly easy to make it thread-safe by > creating a task or protected object to synchornize accesses to > it. I've often wondered why more vendors didn't do that. Because a) there is no requirement in the RM to do this b) the programs you are talking about are erroneous c) this kind of locking is expensive Certainly if the problem is that you have multiple tasks doing Put to the same file without synchronization, then absolutely anything may happen when you run the program! Sent via Deja.com http://www.deja.com/ Before you buy.