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-Thread: a07f3367d7,4fe1e6b66c35dfe2 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 02 Feb 2011 16:41:01 -0600 Newsgroups: comp.lang.ada Date: Wed, 2 Feb 2011 17:40:46 -0500 From: "Peter C. Chapin" Subject: Re: About task-safeness In-Reply-To: Message-ID: References: <3195b61d-e545-454d-8516-4ba16b490df0@glegroupsg2000goo.googlegroups.com> User-Agent: Alpine 2.00 (WNT 1167 2008-08-23) X-X-Sender: pcc09070@vtc.vsc.edu@webmail.vtc.edu MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-wi6MiRvMhyEivQTZaxi6Vp9oCYZKtf9PVhcSkTDQX2E1R4vHK1+fV4bX/ojz2S0JPAD+/u1y8vmYzC+!X0orLI7uKoOlyouZekahETb5AmUfYQrd2ZjO42Qmw+2uDYC96BTPa912c2cpJjDpuV2PsaFkSw== X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2162 Xref: g2news1.google.com comp.lang.ada:16830 Date: 2011-02-02T17:40:46-05:00 List-Id: On Wed, 2 Feb 2011, Shark8 wrote: >> two tasks "only reading" values from the same container are *not* safe . > > Interesting! That is counter-intuitive; do you have a link to an > example/explaination? Actually, in the absence of documentation to the contrary, I wouldn't expect simultaneous reads to be safe. Some data structures get modified internally in response to reads. For example splay trees[1] bring the last read item to the root. Thus looking up an item in a splay tree entails various transformations on the tree that would have to be reviewed for task safety (or otherwise protected). By not guaranteeing task safety during simultaneous reads, the Ada reference manual is allowing implementors to keep their options open. That seems fair to me. Peter [1] http://en.wikipedia.org/wiki/Splay_tree