Peter Dimov wrote:
The TR1 generators have no hidden global state as far as I know, so they
(ought to) provide the usual "basic thread safety". :-)
Right, I've now gone back to working on this, and have significantly
modified the testcase to improve coverage. I didn't verbatim copy the
boost algorithm that was posted, as I didn't think it stressed the code
for potential race conditions enough.
The attached patches against trunk and v7 are ready to be committed as
far as I'm concerned. I've got write access now, so I just need an 'OK',
and I need to know which branch(es) to commit to.
The testing code uses a TR1 Mersenne Twister RNG for each thread. The v7
branch doesn't seem to have the TR1 random bits, simply copying them
across seems to work though, so I created my patch under the assumption
that it will be copied across.