File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -332,7 +332,9 @@ TEST(SkipListTest, ConcurrentReadTest) {
332
332
std::vector<std::thread> threads;
333
333
threads.reserve (num_threads);
334
334
335
- const int total_num_elements = num_threads * 8192 ;
335
+ // Note: you might want to first try use a smaller number of elements
336
+ // if you are running this test on local machine.
337
+ const int total_num_elements = num_threads * 100000 ;
336
338
auto list = std::make_unique<SkipList<int >>();
337
339
// Insert some elements into the skip list
338
340
for (int i = 0 ; i < total_num_elements; ++i) {
@@ -347,6 +349,7 @@ TEST(SkipListTest, ConcurrentReadTest) {
347
349
};
348
350
349
351
// Launch threads to perform concurrent reads
352
+ // Note: You will see a timeout if your reads cannot share access to the skip list
350
353
for (int i = 0 ; i < num_threads; ++i) {
351
354
threads.emplace_back (read_task, 0 , total_num_elements);
352
355
}
You can’t perform that action at this time.
0 commit comments