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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,16594902ce57591b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.germany.com!news.teledata-fn.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Multitasking and containers Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Fri, 24 Nov 2006 11:19:23 +0100 Message-ID: NNTP-Posting-Date: 24 Nov 2006 11:19:23 CET NNTP-Posting-Host: 064908ae.newsspool4.arcor-online.net X-Trace: DXC=bRNTPH_D6Fa[F<50eo:0kn4IUKWT\7JiDNcfSJ;bb[eFCTGGVUmh?dN\HXHJ4e80n6G94=ng5ZTg X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:7680 Date: 2006-11-24T11:19:23+01:00 List-Id: On Fri, 24 Nov 2006 09:51:24 +0100, Maciej Sobczak wrote: > Paragraph 3 in Annex A says that it's OK to call any standard subprogram > from concurrent tasks as long as the parameters do not overlap. John > Barnes ("Progamming in Ada 2005") suggests that in order to (for > example) read from the same container, the operations need to be > protected "by using the normal techniques such as protected objects". > > But reading from the protected object is not mutually exclusive (many > readers are allowed) - so where's the gain? What's the difference > between concurrent reads of, say, a Vector via protected object vs. > direct access? I think he didn't mean container being a protected object. It would be difficult to do, because protected types alas aren't tagged. So I read it as "by using a locking/serialization technique, such as mutex, which can be implemented as a protected object." [ I don't know if ARM 2005 permits mutable implementations of read operations on the containers. I suppose it does, so the need to lock upon read. ] -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de