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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.120.129 with SMTP id lc1mr14752816obb.21.1399216724026; Sun, 04 May 2014 08:18:44 -0700 (PDT) X-Received: by 10.140.44.75 with SMTP id f69mr5593qga.11.1399216724002; Sun, 04 May 2014 08:18:44 -0700 (PDT) Path: border2.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!c1no1316966igq.0!news-out.google.com!dz10ni30394qab.1!nntp.google.com!hw13no276285qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 4 May 2014 08:18:43 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=206.53.78.59; posting-account=ShYTIAoAAABytvcS76ZrG9GdaV-nXYKy NNTP-Posting-Host: 206.53.78.59 References: <7403d130-8b42-43cd-a0f1-53ba34b46141@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6c2cd5d4-a44c-4c18-81a3-a0e87d25cd9e@googlegroups.com> Subject: Re: Safety of unprotected concurrent operations on constant objects From: sbelmont700@gmail.com Injection-Date: Sun, 04 May 2014 15:18:44 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 2000 Xref: number.nntp.dca.giganews.com comp.lang.ada:186205 Date: 2014-05-04T08:18:43-07:00 List-Id: On Sunday, May 4, 2014 3:46:00 AM UTC-4, Natasha Kerensikova wrote: >=20 > So I guess to correctly frame it as a question, that would be: how can I >=20 > have a map capable of concurrent reads with minimal wheel reinvention? >=20 You really can't. You can either reinvent the wheel in your own task-safe = manner, or assume-the-worst about the standard map and surround it with a m= utex. Though, as was said, the split-seconds you would burn on the mutex w= ould be negligible when compared to the network delay of supplying the resu= lts. -sb