Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2003-12-29 19:33:44


At 05:32 PM 12/29/2003, Jens Maurer wrote:
>
>Narendran wrote:
>> I am working on boost::random. I am using this in boost::thread.
Whether
>> boost::random is thread safe. If not how to make it thread safe.
>
>Boost.random does not maintain global state that would need
>protection from multi-threading.
>
>boost.random is thread-safe as long as you don't access
>any given object from two threads simultaneously.
>(Accessing two different objects is ok, as long as
>they don't share an engine).
>If you require that kind of safety, it's trivial to
>roll that on your own with an appropriate mutex
>wrapper.

That question and your reply might make a nice FAQ entry.

Another FAQ question that comes to mind is "What is the relationship
between Boost.Random and the Standard Library's TR1 random numbers?"

I see that N1398 (in the guise of "wg21-propoal.html") is part of the docs,
but there doesn't seem to be an obvious link to it from index.html.

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk