[SDK] Fix data race by syncing emplace and flush operations. (#529)
* Fix data race by syncing reader and writer * Address review comments
Этот коммит содержится в:
@@ -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});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user