Skip to content

Commit 234455a

Browse files
committed
clean code
1 parent b5d1f8e commit 234455a

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/library/cpu/CpuMonitor.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ void CpuMonitor::startMonitoring()
2727
// if monitoring disabled
2828
this->monitoringCpuStatus = true;
2929
monitorThread = std::thread(&CpuMonitor::thread_getCPUUsage, this);
30-
monitorThread.detach(); // Detach the thread so it runs in the background
30+
31+
// Detach the thread so it runs in the background
32+
monitorThread.detach();
3133
}
3234

3335
/**
@@ -137,14 +139,14 @@ void CpuMonitor::thread_getCPUUsage()
137139

138140
/**
139141
* @brief Stops the CPU monitoring process.
140-
*
141-
* This function sets the `monitoringCpuStatus` flag to `false`,
142+
*
143+
* This function sets the `monitoringCpuStatus` flag to `false`,
142144
* indicating that the CPU monitoring should be stopped. Any ongoing
143145
* monitoring activities will cease, and the system will no longer
144146
* collect or process CPU usage data.
145-
*
147+
*
146148
* This method should be called when monitoring is no longer needed
147-
* to ensure that resources are released and the monitoring process
149+
* to ensure that resources are released and the monitoring process
148150
* is gracefully terminated.
149151
*/
150152
void CpuMonitor::stopMonitoring()

0 commit comments

Comments
 (0)