Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 94055 invoked from network); 21 Jul 2006 00:59:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jul 2006 00:59:26 -0000 Received: (qmail 1343 invoked by uid 500); 21 Jul 2006 00:59:26 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 1327 invoked by uid 500); 21 Jul 2006 00:59:26 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 1316 invoked by uid 99); 21 Jul 2006 00:59:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2006 17:59:26 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [208.30.140.160] (HELO moroha.quovadx.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2006 17:59:26 -0700 Received: from qxvcexch01.ad.quovadx.com (qxvcexch01.ad.quovadx.com [192.168.170.59]) by moroha.quovadx.com (8.13.6/8.13.4) with ESMTP id k6L0wDtH005348 for ; Fri, 21 Jul 2006 00:58:14 GMT Received: from [10.70.3.113] ([10.70.3.113]) by qxvcexch01.ad.quovadx.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 20 Jul 2006 18:59:04 -0600 Message-ID: <44C026F8.40601@roguewave.com> Date: Thu, 20 Jul 2006 18:59:36 -0600 From: Martin Sebor Organization: Rogue Wave Software User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 X-Accept-Language: en-us, en MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: RE: string methods thread safety Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 21 Jul 2006 00:59:04.0789 (UTC) FILETIME=[DCCCE050:01C6AC60] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N (I lost your post so I'm recreating it from the archive -- it may not thread properly.) > > -----Original Message----- > > From: Martin Sebor [mailto:sebor@roguewave.com] > > Sent: Friday, July 07, 2006 3:46 AM > > To: stdcxx-dev@incubator.apache.org > > Subject: Re: string methods thread safety > > > [...] > > The thread safety tests I envision for our test suite would > > exercise a subset (as small as a pair) of functions per each > > run. The one constant (as in the same across all test runs) > > function would be the copy ctor (or its equivalent such as > > the assignment operator) and the other a modifying string > > function. The copy ctor would be used to create a copy of a > > shared string object for each thread and the modifying > > function would then operate on the copy. > > Martin, I implemented the first draft of the test. > > The append method overloads are tested only. Other methods I > will append to the test tomorrow. Could you please post your proposed ChangeLog entry for all nontrivial changes? It will make it easier for me to understand what's going on. Thanks! :) I just looked at this briefly but it looks like the right approach (or at least like the one I had in mind ;-) The only thing I'm not quite happy with so far is making _rw_setvars extern. According to the (still unwritten, my bad) naming convention, names that start with _rw_ have internal linkage, and shouldn't be exposed to the world (i.e., to the tests or other objects). If it turns out that the function is helpful elsewhere besides the TU where it's declared static we should rename it (and drop the leading underscore). The burden that should come with doing it is writing a test for the function. I realize that's a lot of overhead, but that's intentional. I'm trying to minimize the test driver interface to make it easier to use. Minimizing it will lead to making it as generic as possible, which I think is a good thing (i.e., it would be very nice to be able to use the same part of the driver for both the string and the container tests. But I'm afraid I'm running out of time today. Let me get back to it tomorrow. I'll also try to fix the rw_thread_create() issue with the argument. Martin