fixing more ci erros

This commit is contained in:
matlabbe
2026-05-29 09:35:14 -07:00
parent 71b259a884
commit d9ef6ad231
2 changed files with 13 additions and 1 deletions
+7
View File
@@ -1,5 +1,12 @@
#include <gtest/gtest.h>
#include <opencv2/core.hpp>
#if CV_MAJOR_VERSION < 3
#ifdef HAVE_OPENCV_GPU
#include <opencv2/gpu/gpu.hpp>
#endif
#else
#include <opencv2/core/cuda.hpp>
#endif
#include "rtabmap/core/VWDictionary.h"
#include "rtabmap/core/VisualWord.h"
#include "rtabmap/core/Parameters.h"
+6 -1
View File
@@ -175,7 +175,12 @@ TEST(USemaphoreTest, ThreadSafety)
for(int i = 0; i < numThreads * iterations; ++i)
{
sem.release();
std::this_thread::sleep_for(std::chrono::microseconds(10));
// yield() instead of sleep_for(10us): Windows's default 15.6ms
// timer tick turns "10us" into ~15ms, blowing this 400-iter loop
// up to ~6s on Windows CI for no benefit. yield() still lets the
// waiting acquirers run between releases without the wall-clock
// cost.
std::this_thread::yield();
}
});