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,4cf1fd41f64f8f02 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news4.google.com!news.glorb.com!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsinpeer00.lnd.ops.eu.uu.net!emea.uu.net!peer-uk.news.demon.net!kibo.news.demon.net!mutlu.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: task-safe hash table? Date: Thu, 01 Jun 2006 07:32:49 +0100 Organization: Pushface Message-ID: References: <-uydndpW7o1K9-bZnZ2dnUVZ_v-dnZ2d@comcast.com> <1148943364.334619.24290@j73g2000cwa.googlegroups.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1149143569 21312 62.49.19.209 (1 Jun 2006 06:32:49 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Thu, 1 Jun 2006 06:32:49 +0000 (UTC) Cancel-Lock: sha1:ii2ATmtnCJdSqPKQCq4dgMBwMco= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news2.google.com comp.lang.ada:4633 Date: 2006-06-01T07:32:49+01:00 List-Id: "John" writes: > tmoran@acm.org wrote: >> Is there some code around for a hash table that allows multiple tasks >> to do simultaneous lookup? > > I think you might be able to get part way by consulting the original > Booch components. The 95 BCs were going to have Synchronized and Guarded extensions, but (a) the design meant that this was going to be a _lot_ of work, (b) the form that just did a global lock on the container was easy enough to do, but the other, which was meant to implement finer granularity, turned out to be far too application-specific; so I ended up not doing either. The killer was iteration. It seems better to use the BCs (or Ada.Containers come to that) as an implementation mechanism for whatever storage your application needs behind appropriate concurrency mechanisms.