🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #4080

Re: Is STL MT-Safe?

#4080
From: Jerry Coffin
Date: Wed, 17 Apr 1996 14:57
25 lines
1753 bytes
In article <4ku297$ou6@usc.edu>, Hauck@mizar.usc.edu says...
> Hi there,
> 
> I wonder if the C++ Standard Template Library (STL) is multi-thread
> safe? Does anybody have experience with STL in a multi-threaded
> environment?

Hmm...that's a bit like asking whether "cars are fast".  Some are, some 
aren't, and of course "fast" is a bit subjective.

Likewise with STL: the classes are defined in such as way that it should be 
fairly easy to make them reentrant, and they don't require the use of a lot of 
global data that would have to be made thread-local.

However, that doesn't imply that every implementation of STL will be safe for 
multithreaded use.  The standard says nothing about threads, so it says 
equally little about the classes being safe for use with threads.
    Later,
    Jerry.

[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
Technical Details
Message-ID: <MPLANET.31742743jcoffin989cc4@news.rmii.com>
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage
References: <4ku297$ou6@usc.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage
From: jcoffin@rmii.com (Jerry Coffin)
Newsgroups: comp.std.c++
Subject: Re: Is STL MT-Safe?
Date: 17 Apr 1996 14:57:54 GMT
Organization: TAEUS
Approved: clamage@eng.sun.com (comp.std.c++)
Message-ID: <MPLANET.31742743jcoffin989cc4@news.rmii.com>
References: <4ku297$ou6@usc.edu>
NNTP-Posting-Host: taumet.eng.sun.com
X-Nntp-Posting-Host: slip22163.rmii.com
X-Newsreader: MicroPlanet News32 v1.00 Beta Build 302
Content-Length: 803
X-Lines: 19
Originator: clamage@taumet