Skip to content

Commit ed77e1b

Browse files
yfeldblumfacebook-github-bot
authored andcommitted
fix random check in ThreadEntrySet::basicSanity
Summary: The check was accidentally inverted, causing debug-build code to spend more time in `ThreadEntrySet::basicSanity()` than desired. Likely affecting many unit-tests. Reviewed By: dmm-fb Differential Revision: D76755339 fbshipit-source-id: a4189a60fb6c27e0a50e83e37f786b00f71aa8d2
1 parent 0e4c3d7 commit ed77e1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

third-party/folly/src/folly/detail/ThreadLocalDetail.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ bool ThreadEntrySet::basicSanity() const {
7070
auto const size = threadElements.size();
7171
rand_engine rng;
7272
std::uniform_int_distribution<size_t> dist{0, size - 1};
73-
if (dist(rng) < constexpr_log2(size)) {
73+
if (!(dist(rng) < constexpr_log2(size))) {
7474
return true;
7575
}
7676
return //

0 commit comments

Comments
 (0)