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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8e11100f675ea2df X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.96.231 with SMTP id dv7mr11354682wib.6.1357215069525; Thu, 03 Jan 2013 04:11:09 -0800 (PST) Path: l12ni281230wiv.1!nntp.google.com!proxad.net!feeder1-2.proxad.net!weretis.net!feeder4.news.weretis.net!news.teledata-fn.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 03 Jan 2013 13:11:21 +0100 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: asynchronous task communication References: <1c2dnd5E6PMDR33NnZ2dnUVZ_sednZ2d@earthlink.com> <50e18094$0$6583$9b4e6d93@newsspool3.arcor-online.net> <7NednS4s2oukfXzNnZ2dnUVZ_oadnZ2d@earthlink.com> <7cudnYloBfQDw3_NnZ2dnUVZ_rKdnZ2d@earthlink.com> In-Reply-To: Message-ID: <50e5755c$0$9517$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 03 Jan 2013 13:11:08 CET NNTP-Posting-Host: c7980eff.newsspool1.arcor-online.net X-Trace: DXC=S7kah`]:5_2nBOkdL^Lo7>ic==]BZ:af>4Fo<]lROoR1nkgeX?EC@@0FMP^6DDEk_7PCY\c7>ejV8`>CG5>KTJ7??OR?NOaI4n0 X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2013-01-03T13:11:08+01:00 List-Id: On 03.01.13 02:30, Charles Hixson wrote: > I guess a part of the question is "What is the overhead on a protected variable?". If it's small, then I'd prefer to have one attached to every cell, as it eliminates one centralized spot of contention, and means that slightly simpler messages can be passed. Chances are that a protected object employs a locking mechanism of the OS (at least in a "PC run-time"). This is probably not the fastest, leanest thing to have. However, I guess you could use CAS based access to the letter boxes, in particular if the number of messages is fixed. Pat Rogers has illustrated an example, also referred to in Ada Gems #93 and #98, http://benchmarksgame.alioth.debian.org/u32q/program.php?test=chameneosredux&lang=gnat&id=2 http://www.adacore.com/adaanswers/gems/gem-93-high-performance-multi-core-programming-part-1/