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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Status of AdaCL: Ada Class Library Date: Wed, 24 Feb 2010 17:48:18 -0600 Organization: Jacob Sparre Andersen Message-ID: References: <05a58751-7a13-48d6-9080-91322817bfe8@t32g2000pre.googlegroups.com> <7ue685FpluU1@mid.individual.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1267055299 6228 69.95.181.76 (24 Feb 2010 23:48:19 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 24 Feb 2010 23:48:19 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!feed.ac-versailles.fr!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail Xref: g2news1.google.com comp.lang.ada:9310 Date: 2010-02-24T17:48:18-06:00 List-Id: Am 22.02.2010, 02:51 Uhr, schrieb Bj�rn Persson : > I had intended to switch from Charles to Ada.Containers, but I changed my > mind when I learned that Ada.Containers can't even be read by multiple > tasks at once. For the record, we've studied this several times and have always concluded that hidden synchronization is dangerous. That is, synchronization should be explicit. Beyond that, it is impossible to come up with a reasonable definition of what should be locked -- it really depends on the use of the containers. In the case of the containers, task safety of iterators and similar features is something that defies a reasonable definition. The problem gets worse if you include features used together (such as using First and Next to create a loop of some sort). We'd probably need to make the locks visible in order for them to be useful. It's easy to wrap container operations in a protected object, and that is always allowed (such operations are not potentially blocking). That allows tailoring the locking for the actual usage, and even hiding the actual container to prevent abuse. Randy.