A function for testing, we need to make sure that all the store tasks have completed before any lookup when running test case in async write mode.
| 104 | /// A function for testing, we need to make sure that all the store tasks have completed |
| 105 | /// before any lookup when running test case in async write mode. |
| 106 | static void WaitForAsyncWrite(const DataCache& cache) { |
| 107 | while (cache.current_buffer_size_.Load() != 0) { |
| 108 | usleep(500); |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | // |
| 113 | // Use multiple threads to insert and read back a set of ranges from test_buffer(). |