mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-03 16:47:47 +08:00
fixing more ci erros
This commit is contained in:
@@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user