comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Status of AdaCL: Ada Class Library
Date: Wed, 24 Feb 2010 17:48:18 -0600
Date: 2010-02-24T17:48:18-06:00	[thread overview]
Message-ID: <hm4ds3$62k$1@munin.nbi.dk> (raw)
In-Reply-To: op.u8ndnytuz25lew@macpro.krischik.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1185 bytes --]

Am 22.02.2010, 02:51 Uhr, schrieb Bj�rn Persson <bjorn@rombobj�rn.se>:

> 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.





  reply	other threads:[~2010-02-24 23:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-21 22:09 Status of AdaCL: Ada Class Library Michael R
2010-02-22  1:51 ` Björn Persson
2010-02-22  2:07   ` Michael R
2010-02-24 19:56   ` Martin Krischik
2010-02-24 23:48     ` Randy Brukardt [this message]
2010-02-25  9:22       ` Georg Bauhaus
2010-02-25 12:23       ` Stephen Leake
2010-02-25 14:16         ` Alex R. Mosteo
2010-02-25 20:19           ` sjw
2010-02-24 19:54 ` Martin Krischik
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox