C++ Thread Safety

C library functions are quite well documented with regard to thread safety,
but what about C++? I can’t find any detail about this in the docs or on the
qnx or the dinkumware web sites.

Thanks,
Marty Doane

Ping.

“Marty Doane” <doanemr@rapistan.com> wrote in message
news:9l91vm$750$1@inn.qnx.com

C library functions are quite well documented with regard to thread
safety,
but what about C++? I can’t find any detail about this in the docs or on
the
qnx or the dinkumware web sites.

Thanks,
Marty Doane

Starting with 6.1 C++ is thread safe.


“Marty Doane” <doanemr@rapistan.com> wrote in message
news:9le81n$fgm$1@inn.qnx.com

Ping.

“Marty Doane” <> doanemr@rapistan.com> > wrote in message
news:9l91vm$750$> 1@inn.qnx.com> …
C library functions are quite well documented with regard to thread
safety,
but what about C++? I can’t find any detail about this in the docs or on
the
qnx or the dinkumware web sites.

Thanks,
Marty Doane

\

Thanks, Mario. I assume you mean blanket across-the-board safe. I was
wondering if the C++ library has the same characteristics as the C library,
in that many things are thread safe, but not all.

Marty

“Mario Charest” <mcharest@zinformatic.com> wrote in message
news:9leapu$h7e$1@inn.qnx.com

Starting with 6.1 C++ is thread safe.


“Marty Doane” <> doanemr@rapistan.com> > wrote in message
news:9le81n$fgm$> 1@inn.qnx.com> …
Ping.

“Marty Doane” <> doanemr@rapistan.com> > wrote in message
news:9l91vm$750$> 1@inn.qnx.com> …
C library functions are quite well documented with regard to thread
safety,
but what about C++? I can’t find any detail about this in the docs or
on
the
qnx or the dinkumware web sites.

Thanks,
Marty Doane



\

“Marty Doane” <doanemr@rapistan.com> wrote in message
news:9lehjm$l5n$1@inn.qnx.com

Thanks, Mario. I assume you mean blanket across-the-board safe. I was
wondering if the C++ library has the same characteristics as the C
library,
in that many things are thread safe, but not all.

With 6.1 even stuff that wasn’t thread safe with 6.0 now is ex: strtok.

6.1 is based on dynkum library.

Marty

“Mario Charest” <> mcharest@zinformatic.com> > wrote in message
news:9leapu$h7e$> 1@inn.qnx.com> …

Starting with 6.1 C++ is thread safe.


“Marty Doane” <> doanemr@rapistan.com> > wrote in message
news:9le81n$fgm$> 1@inn.qnx.com> …
Ping.

“Marty Doane” <> doanemr@rapistan.com> > wrote in message
news:9l91vm$750$> 1@inn.qnx.com> …
C library functions are quite well documented with regard to thread
safety,
but what about C++? I can’t find any detail about this in the docs
or
on
the
qnx or the dinkumware web sites.

Thanks,
Marty Doane





\

Previously, Marty Doane wrote in qdn.public.qnxrtp.devtools:

C library functions are quite well documented with regard to thread safety,
but what about C++? I can’t find any detail about this in the docs or on the
qnx or the dinkumware web sites.

I think it goes something like this:

Simultaneous read accesses to the same container is fine. Simultaneous write
accesses to distinct containers is also fine. Simultaneous write accesses to
the same container requires user locking, as does any combination of both
read and write access.

The allocator is threadsafe (simultaneous calls to allocate are fine). I also
suspect that simultaneous calls to iostream functions on the same stream are
ok, but don’t quote me on that one. I’ll probably find out this one for sure
in the next few days - we’re migrating from STLport (based on SGI’s libraries
which did have threadsafe iostream writes to the same stream) on 6.0 to
Dinkumware on 6.1 at the moment.

Tom