[Gdal-dev] Re: GDAL Coding Guidelines

Mateusz Loskot mateusz at loskot.net
Wed May 31 12:54:44 EDT 2006


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



More information about the Gdal-dev mailing list