This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: basic_string::release and thread safety: what about
- To: dvv at dvv dot ru
- Subject: Re: basic_string::release and thread safety: what about
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Tue, 06 Jul 1999 17:25:24 -0700
- Cc: jbuck at Synopsys dot COM, drepper at cygnus dot com, egcs at egcs dot cygnus dot com
- Organization: CodeSourcery, LLC
- References: <199907062351.QAA13766@atrus.synopsys.com><378698d1.17199986@localhost>
>>>>> "Dima" == Dima Volodin <dvv@dvv.ru> writes:
>> I'm not willing to pay 10x or more speed penalties on
>> uniprocessor, non-threaded code myself.
Note that you're assuming that there should be some way to share
strings across threads. I don't think that's *automatically* a
given, although, obviously I see the benefits.
If the only way to share a string across threads is to put it in
global storage, and acquire a mutex before accessing it, then there's
no need for any single-threaded penalty. It's a
quality-of-implementation question; would such a "bare-bones" solution
be acceptable?
I don't really have an opinion; just throwing out an idea at what
extreme end of the spectrum.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com