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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e0e1d3b3f7c994b8 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!60g2000hsy.googlegroups.com!not-for-mail From: Vadim Godunko Newsgroups: comp.lang.ada Subject: Re: Robert Dewar's great article about the Strengths of Ada over other langauges in multiprocessing! Date: Tue, 11 Mar 2008 08:41:44 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <13t4b2kkjem20f3@corp.supernews.com> <89af8399-94fb-42b3-909d-edf3c98d32e5@n75g2000hsh.googlegroups.com> <47D39DC8.20002@obry.net> <114f711c-9cf8-4fdb-8f11-77667afb8719@c33g2000hsd.googlegroups.com> NNTP-Posting-Host: 87.117.10.96 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1205250105 19146 127.0.0.1 (11 Mar 2008 15:41:45 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 11 Mar 2008 15:41:45 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 60g2000hsy.googlegroups.com; posting-host=87.117.10.96; posting-account=niG3UgoAAAD7iQ3takWjEn_gw6D9X3ww User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070601 SeaMonkey/1.1.2,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20296 Date: 2008-03-11T08:41:44-07:00 List-Id: On Mar 11, 4:58 pm, george.p...@gmail.com wrote: > > This code is not multi-core safe. Are you sure that QString has > Vtab? If not then comparison will be unfair. What is it "Vtab"? QString implemented in the same way as Universal_String. Both classes internally use shared data - actual string and reference counter. Operations on both classes are "reentrant" (see 1) and not "thread- safe" (see 2). Both classes will be even not "reentrant" without atomic increment/decrement operations. PS. (1) A reentrant function can be called simultaneously by multiple threads provided that each invocation of the function references unique data. (2) A thread-safe function can be called simultaneously by multiple threads when each invocation references shared data. All access to the shared data is serialized.