[SDK] Fix data race by syncing emplace and flush operations. (#529)

* Fix data race by syncing reader and writer

* Address review comments
Этот коммит содержится в:
U, Srihari
2025-08-05 21:37:00 +05:30
коммит произвёл GitHub
родитель e3206c8a29
Коммит fc3eb4211d
2 изменённых файлов: 14 добавлений и 2 удалений
+1 -1
Просмотреть файл
@@ -168,7 +168,7 @@ flush(rocprofiler_buffer_id_t buffer_id, bool wait)
while(buff->syncer.test_and_set())
{
std::this_thread::yield();
std::this_thread::sleep_for(std::chrono::milliseconds{10});
std::this_thread::sleep_for(std::chrono::microseconds{10});
}
}