[Gdal-dev] Re: GDAL Coding Guidelines

Chapman, Martin MChapman at sanz.com
Wed May 31 14:55:33 EDT 2006


Mateusz,

Thanks for the info.  I didn't know that.  I understood that threading
is not part of the C++ lib, but I didn't know that there were thread
safe versions of stl...cool.

Thanks,
Martin

-----Original Message-----
From: gdal-dev-bounces at lists.maptools.org
[mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of Mateusz Loskot
Sent: Wednesday, May 31, 2006 10:55 AM
To: gdal-dev at lists.maptools.org
Subject: Re: [Gdal-dev] Re: GDAL Coding Guidelines

Chapman, Martin wrote:
> I can think of a reason not to use streams.  They're not thread safe.
>  Printf() is thread safe though, if you properly create your threads.
>  On windows you would use _beginthreadex() and _endthreadex().
> Please correct me if I'm wrong.

That's not exactly true.
Threading is not a part of C++ Language Standard.
It is an implementation detail, so if you need thread-safe STL, then you
have to use appropriate implementation of STL.

All widely used STL implementations like SGI STL, STLport, Dinkumware
(this impl. isshipped with Visual C++) provide single-thread and
multi-thread versions.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net
_______________________________________________
Gdal-dev mailing list
Gdal-dev at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/gdal-dev




More information about the Gdal-dev mailing list