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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Natasha Kerensikova Newsgroups: comp.lang.ada Subject: Re: =?UTF-8?Q?GNAT=C2=A0and?= Tasklets Date: Fri, 19 Dec 2014 08:39:44 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <455d0987-734a-4505-bb39-37bfd1a2cc6b@googlegroups.com> Injection-Date: Fri, 19 Dec 2014 08:39:44 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="76a49b86bc3e16725b7cfca3d85cb4c8"; logging-data="3613"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/YsQhFlBUoTQnN4iZkL1pH" User-Agent: slrn/1.0.1 (FreeBSD) Cancel-Lock: sha1:GGaXPjEWT2rSb1ium3RKH8MNPKI= Xref: news.eternal-september.org comp.lang.ada:24134 Date: 2014-12-19T08:39:44+00:00 List-Id: Hello, On 2014-12-18, Randy Brukardt wrote: > [...] That's true of *any* Ada object -- without > documentation and/or code to manage it, it should be assumed to only work > with one task at a time. That's a bit at odds with a recent (or not so recent) discussion, where I didn't find in the RM where it is written that concurrent read-only basic operations (like access dereference, array indexing, etc) are task-safe, and the answer was that everything should work as expected unless explicitly noted otherwise, even when concurrency is involved. For example, I wrote Constant_Indefinite_Ordered_Maps (available at https://github.com/faelys/natools/blob/trunk/src/natools-constant_indefinite_ordered_maps.ads ) which is an ordered map based on a binary search in a sorted array. It is meant to be task-safe without any code to manage it, basing its safety solely under the assumption that concurrent access dereference and concurrent array indexing are safe. I hope it's not a brittle assumption... Natasha