mirror of
https://github.com/eclipse-openvehicle-api/openvehicle-api.git
synced 2026-08-30 12:15:12 +00:00
connection between 2 systems and bug fixes (#14)
This commit is contained in:
@@ -997,12 +997,12 @@ TEST(DataDispatchServiceTest, DirectRxTxSignalConcurrency)
|
||||
// Start the threads
|
||||
std::unique_lock<std::shared_mutex> lockStart(mtxStart);
|
||||
uint32_t uiCnt = 0;
|
||||
std::thread rgPublishThreads[16];
|
||||
for (std::thread& rThread : rgPublishThreads)
|
||||
rThread = std::thread(fnPublisher, uiCnt++);
|
||||
std::thread rgConsumeThreads[16];
|
||||
for (std::thread& rThread : rgConsumeThreads)
|
||||
rThread = std::thread(fnConsumer, uiCnt++);
|
||||
sdv::core::secure_thread rgPublishThreads[16];
|
||||
for (sdv::core::secure_thread& rThread : rgPublishThreads)
|
||||
rThread = sdv::core::secure_thread(fnPublisher, uiCnt++);
|
||||
sdv::core::secure_thread rgConsumeThreads[16];
|
||||
for (sdv::core::secure_thread& rThread : rgConsumeThreads)
|
||||
rThread = sdv::core::secure_thread(fnConsumer, uiCnt++);
|
||||
|
||||
// Trigger the "GO"
|
||||
while (uiInitCnt < 32) std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||
@@ -1057,9 +1057,9 @@ TEST(DataDispatchServiceTest, DirectRxTxSignalConcurrency)
|
||||
// Wait for all threads to finalize
|
||||
appcontrol.SetConfigMode();
|
||||
bShutdown = true;
|
||||
for (std::thread& rThread : rgPublishThreads)
|
||||
for (sdv::core::secure_thread& rThread : rgPublishThreads)
|
||||
if (rThread.joinable()) rThread.join();
|
||||
for (std::thread& rThread : rgConsumeThreads)
|
||||
for (sdv::core::secure_thread& rThread : rgConsumeThreads)
|
||||
if (rThread.joinable()) rThread.join();
|
||||
|
||||
signalTx1a.Reset();
|
||||
|
||||
@@ -1546,12 +1546,12 @@ TEST(DataDispatchServiceTest, TransactionalRxTxSignalConcurrency)
|
||||
// Start the threads
|
||||
std::unique_lock<std::shared_mutex> lockStart(mtxStart);
|
||||
uint32_t uiCnt = 0;
|
||||
std::thread rgPublishThreads[16];
|
||||
for (std::thread& rThread : rgPublishThreads)
|
||||
rThread = std::thread(fnPublisher, uiCnt++);
|
||||
std::thread rgConsumeThreads[nConsumeThreads];
|
||||
for (std::thread& rThread :rgConsumeThreads)
|
||||
rThread = std::thread(fnConsumer, uiCnt++);
|
||||
sdv::core::secure_thread rgPublishThreads[16];
|
||||
for (sdv::core::secure_thread& rThread : rgPublishThreads)
|
||||
rThread = sdv::core::secure_thread(fnPublisher, uiCnt++);
|
||||
sdv::core::secure_thread rgConsumeThreads[nConsumeThreads];
|
||||
for (sdv::core::secure_thread& rThread :rgConsumeThreads)
|
||||
rThread = sdv::core::secure_thread(fnConsumer, uiCnt++);
|
||||
|
||||
// Trigger the "GO"
|
||||
while (uiInitCnt < 32) std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||
@@ -1630,11 +1630,11 @@ TEST(DataDispatchServiceTest, TransactionalRxTxSignalConcurrency)
|
||||
// Wait for all threads to finalize
|
||||
appcontrol.SetConfigMode();
|
||||
bShutdownPublisher = true;
|
||||
for (std::thread& rThread : rgPublishThreads)
|
||||
for (sdv::core::secure_thread& rThread : rgPublishThreads)
|
||||
if (rThread.joinable()) rThread.join();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||
bShutdownConsumer = true;
|
||||
for (std::thread& rThread : rgConsumeThreads)
|
||||
for (sdv::core::secure_thread& rThread : rgConsumeThreads)
|
||||
if (rThread.joinable()) rThread.join();
|
||||
|
||||
// Check consume ranges
|
||||
|
||||
Reference in New Issue
Block a user