Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Remove thread_local from test_bitcoin #14985

Merged
merged 2 commits into from Dec 18, 2018

Conversation

@MarcoFalke
Copy link
Member

@MarcoFalke MarcoFalke 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.

@@ -26,7 +26,7 @@ std::ostream& operator<<(typename std::enable_if<std::is_enum<T>::value, std::os
return stream << static_cast<typename std::underlying_type<T>::type>(e);
}

thread_local extern FastRandomContext g_insecure_rand_ctx;
extern FastRandomContext g_insecure_rand_ctx;

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

@laanwj laanwj Dec 17, 2018

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

@MarcoFalke MarcoFalke force-pushed the Mf1812-testNoThreadLocal branch from fac748e to fa61202 Dec 17, 2018
@laanwj
Copy link
Member

@laanwj laanwj commented Dec 18, 2018

utACK fa61202

@promag
Copy link
Member

@promag promag commented Dec 18, 2018

utACK fa61202.

@@ -152,12 +152,13 @@ BOOST_AUTO_TEST_CASE(processnewblock_signals_ordering)
// 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
Member

@promag promag Dec 18, 2018

👋

@MarcoFalke MarcoFalke merged commit fa61202 into bitcoin:master Dec 18, 2018
2 checks passed
MarcoFalke added a commit that referenced this issue 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
@MarcoFalke MarcoFalke deleted the Mf1812-testNoThreadLocal branch Dec 18, 2018
Munkybooty added a commit to Munkybooty/dash that referenced this issue Aug 8, 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 added a commit to Munkybooty/dash that referenced this issue Aug 8, 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 added a commit to Munkybooty/dash that referenced this issue 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 added a commit to Munkybooty/dash that referenced this issue 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 added a commit to Munkybooty/dash that referenced this issue Aug 13, 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 added a commit to Munkybooty/dash that referenced this issue 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants