Commit b4e56feb authored by Robin Cheng's avatar Robin Cheng Committed by Facebook GitHub Bot

Fix TSAN too-many-threads error for //folly/test:concurrent_skip_list_test.

Summary: TSAN has a limit of 8128 threads.

Reviewed By: yfeldblum

Differential Revision: D22888242

fbshipit-source-id: 12b78e11145de433dfa31ea1480649af7f8dac57
parent 73494e3e
......@@ -328,7 +328,9 @@ void testConcurrentAdd(int numThreads) {
TEST(ConcurrentSkipList, ConcurrentAdd) {
// test it many times
for (int numThreads = 10; numThreads < 10000; numThreads += 1000) {
// TSAN has a thread limit around 8k.
auto maxNumThreads = folly::kIsSanitizeThread ? 8000 : 10000;
for (int numThreads = 10; numThreads < maxNumThreads; numThreads += 1000) {
testConcurrentAdd(numThreads);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment