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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,470860aa3e635a7 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!news-in-01.newsfeed.easynews.com!news-in-02.newsfeed.easynews.com!easynews.com!easynews!news.he.net!xara.net!gxn.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: GNAT for MS Visual Studio Date: Tue, 09 Oct 2007 22:01:52 +0100 Organization: Pushface Message-ID: References: <13duou81kg3sd1c@corp.supernews.com> <4xsl4zw3bp.fsf@hod.lan.m-e-leypold.de> <1191357491.860178.230380@22g2000hsm.googlegroups.com> <4702ADCC.7080209@obry.net> <1191439439.120567.172630@g4g2000hsf.googlegroups.com> <4703F02D.3030207@obry.net> <1191682021.844225.236870@g4g2000hsf.googlegroups.com> <4707A3D0.3070702@obry.net> <47088904.1090201@obry.net> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1191963715 11920 62.49.19.209 (9 Oct 2007 21:01:55 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Tue, 9 Oct 2007 21:01:55 +0000 (UTC) Cancel-Lock: sha1:8ER7agYBAyUgOq6v2nAG/ACgy4U= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) Xref: g2news2.google.com comp.lang.ada:2392 Date: 2007-10-09T22:01:52+01:00 List-Id: "Randy Brukardt" writes: > It would be easier to correctly use "protected" (task-safe) > containers in concurrent uses than ones that only allowed a small > amount of concurrency. Not everyone is an expert in concurrency, > after all. Clearly one can protect a single container, either by wrapping it in (for example) a protected object; or by providing an internal mechanism. But it's been my experience that applications that involve containers at all usually involve more than one container, in the same way that a database application usually involves more than one table. With either implementation technology, you have to preserve integrity. And in the Ada case, that means locking more than one container object at the same time. The BCs had a form where each container object was constrained by (an access to) a sharable mutex object; so you could form a group of container objects with a common mutual exclusion mechanism. But the only way I could see to make this work was to grab the mutex using an open protocol: grab the mutex; manipulate the containers; release the mutex; and once you've done that, there's no point in having the containers mutex-aware -- just use the plain sort, with external mutex. Which is why the BCs no longer have support for concurrency.