[wpilibc,ntcoreffi] DataLogManager: join on Stop() call (#5910)

This ensures the thread has finished prior to returning from Stop().
This commit is contained in:
Peter Johnson
2023-11-10 21:03:30 -08:00
committed by GitHub
parent b6f2d3cc14
commit 95fa5ec72f
2 changed files with 2 additions and 2 deletions

View File

@@ -482,7 +482,7 @@ void DataLogManager::Start(std::string_view dir, std::string_view filename,
void DataLogManager::Stop() {
auto& inst = GetInstance();
inst.owner.GetThread()->m_log.Stop();
inst.owner.Stop();
inst.owner.Join();
}
void DataLogManager::Log(std::string_view message) {

View File

@@ -328,7 +328,7 @@ void DataLogManager::Start(std::string_view dir, std::string_view filename,
void DataLogManager::Stop() {
auto& inst = GetInstance();
inst.owner.GetThread()->m_log.Stop();
inst.owner.Stop();
inst.owner.Join();
}
void DataLogManager::Log(std::string_view message) {