[ace-users] ACE_String vs. std:string

Michael Carr mcarr92365 at yahoo.com
Tue Jul 10 12:23:44 CDT 2007


>> Of particular
>> interest is thread safety (Linux, latest gcc) and
>> performance.

> Neither offer any way to protect against multi-
> threaded access, if that's your concern.

Thanks for the fast response Steve.  What I had in
mind for thread-safety is the following.  I recall an
earlier implementation of string (prior to the C++
standard being approved) that may have been part of
SGI STL (I can't recall), called bastring.h.  It
involved a static string object that I believe
represented the null string, and this object wasn't
thread protected (had an internal reference count that
could become corrupted).  I'm told that this is not
the case with the std::string in recent gcc compilers.
 But still, string instances have the same
threadedness issues that any other standard container
have.  Two threads cannot access the string instance
at the same time.

Regards,

Michael


       
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  



More information about the Ace-users mailing list