Skip to content

Conversation

@Stonesjtu
Copy link
Contributor

Perhaps a simpler alternative for #4041
I'm concerned that the shared generator will introduce extra randomness so that results are not controllable by setting random seed.

@apaszke
Copy link
Contributor

apaszke commented Jan 23, 2018

Adding a mutex won't make the results deterministic. It will serialize access within a single run, but there's no reason why this order has to be repeated in another one.

{
uint64_t y;

pthread_mutex_lock(&_generator->mutex);

This comment was marked as off-topic.

@apaszke
Copy link
Contributor

apaszke commented Jan 23, 2018

It also breaks the windows build. Thanks for the PR, built I'll close this in favor of #4041.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants