Boost logo

Boost :

Subject: Re: [boost] Removing auto_ptr/etc. from Boost
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2015-03-19 14:40:25


On Thursday 19 March 2015 13:24:46 Nevin Liber wrote:
> On 19 March 2015 at 13:19, Andrey Semashev <andrey.semashev_at_[hidden]>
>
> wrote:
> > On Linux rand() is not thread safe in the sense that its result is not
> > predictable, which is fine.
>
> This sounds suspicious.
>
> Are you sure there are no race conditions inside the implementation of
> rand()? If there are race conditions, how do you know they are always
> benign?

I was basing that on the man page. Now I have downloaded glibc sources and can
see it uses a lock internally. So yet again, I was wrong. Live and learn...


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