Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Dec 17, 2018

thread_local seems to be highly controversial according to the discussion in #14953, so remove it again from the tests.

Also remove boost::thread_group in the test that uses it, since I am touching it anyway.

@maflcko maflcko added this to the 0.18.0 milestone Dec 17, 2018
thread_local extern FastRandomContext g_insecure_rand_ctx;
extern FastRandomContext g_insecure_rand_ctx;

static inline void SeedInsecureRand(bool deterministic = false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would make sense to add a warning comment for these helper functions to only use them from the main thread.

@maflcko maflcko force-pushed the Mf1812-testNoThreadLocal branch from fac748e to fa61202 Compare December 17, 2018 18:13
@laanwj
Copy link
Member

laanwj commented Dec 18, 2018

utACK fa61202

@promag
Copy link
Contributor

promag commented Dec 18, 2018

utACK fa61202.

// create a bunch of threads that repeatedly process a block generated above at random
// this will create parallelism and randomness inside validation - the ValidationInterface
// will subscribe to events generated during block validation and assert on ordering invariance
boost::thread_group threads;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋

@maflcko maflcko merged commit fa61202 into bitcoin:master Dec 18, 2018
maflcko pushed a commit that referenced this pull request Dec 18, 2018
fa61202 test: Add comment to g_insecure_rand_ctx (MarcoFalke)
fa0d3c4 test: Undo thread_local g_insecure_rand_ctx (MarcoFalke)

Pull request description:

  `thread_local` seems to be highly controversial according to the discussion in #14953, so remove it again from the tests.

  Also remove boost::thread_group in the test that uses it, since I am touching it anyway.

Tree-SHA512: 977c1f597e3cfbd0e97d0b037d998fdbc701f62e9a2f57e02dbe1727b63ae8ff478dbd9d3d6dc4ffdfa23f2058b331f04949d51f23a8f55b41ecb75f088f1cbe
@maflcko maflcko deleted the Mf1812-testNoThreadLocal branch December 18, 2018 18:42
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Aug 11, 2021
fa61202 test: Add comment to g_insecure_rand_ctx (MarcoFalke)
fa0d3c4 test: Undo thread_local g_insecure_rand_ctx (MarcoFalke)

Pull request description:

  `thread_local` seems to be highly controversial according to the discussion in bitcoin#14953, so remove it again from the tests.

  Also remove boost::thread_group in the test that uses it, since I am touching it anyway.

Tree-SHA512: 977c1f597e3cfbd0e97d0b037d998fdbc701f62e9a2f57e02dbe1727b63ae8ff478dbd9d3d6dc4ffdfa23f2058b331f04949d51f23a8f55b41ecb75f088f1cbe
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Aug 15, 2021
fa61202 test: Add comment to g_insecure_rand_ctx (MarcoFalke)
fa0d3c4 test: Undo thread_local g_insecure_rand_ctx (MarcoFalke)

Pull request description:

  `thread_local` seems to be highly controversial according to the discussion in bitcoin#14953, so remove it again from the tests.

  Also remove boost::thread_group in the test that uses it, since I am touching it anyway.

Tree-SHA512: 977c1f597e3cfbd0e97d0b037d998fdbc701f62e9a2f57e02dbe1727b63ae8ff478dbd9d3d6dc4ffdfa23f2058b331f04949d51f23a8f55b41ecb75f088f1cbe
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants