Skip to content

Commit c0d5d5c

Browse files
committed
Removed joinable()
1 parent aa4f5d6 commit c0d5d5c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+161
-162
lines changed

hardware/1Wire.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ bool C1Wire::StartHardware()
8989

9090
bool C1Wire::StopHardware()
9191
{
92-
if (m_threadSensors && m_threadSensors->joinable())
92+
if (m_threadSensors)
9393
{
9494
m_stoprequested = true;
9595
m_threadSensors->join();
9696
}
9797

98-
if (m_threadSwitches && m_threadSwitches->joinable())
98+
if (m_threadSwitches)
9999
{
100100
m_stoprequested = true;
101101
m_threadSwitches->join();

hardware/1Wire/1WireByKernel.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ C1WireByKernel::C1WireByKernel()
3232

3333
C1WireByKernel::~C1WireByKernel()
3434
{
35-
if (m_thread->joinable())
36-
m_thread->join();
35+
m_thread->join();
3736
}
3837

3938
bool C1WireByKernel::IsAvailable()

hardware/AccuWeather.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ bool CAccuWeather::StartHardware()
7373
m_thread = std::shared_ptr<std::thread>(new std::thread(std::bind(&CAccuWeather::Do_Work, this)));
7474
m_bIsStarted=true;
7575
sOnConnected(this);
76-
return (m_thread != NULL && m_thread->joinable());
76+
return (m_thread != NULL);
7777
}
7878

7979
bool CAccuWeather::StopHardware()
8080
{
81-
if (m_thread != NULL && m_thread->joinable())
81+
if (m_thread != NULL)
8282
{
8383
assert(m_thread);
8484
m_stoprequested = true;

hardware/AnnaThermostat.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ bool CAnnaThermostat::StartHardware()
7777
m_thread = std::shared_ptr<std::thread>(new std::thread(std::bind(&CAnnaThermostat::Do_Work, this)));
7878
m_bIsStarted=true;
7979
sOnConnected(this);
80-
return (m_thread != NULL && m_thread->joinable());
80+
return (m_thread != NULL);
8181
}
8282

8383
bool CAnnaThermostat::StopHardware()
8484
{
85-
if (m_thread != NULL && m_thread->joinable())
85+
if (m_thread != NULL)
8686
{
8787
assert(m_thread);
8888
m_stoprequested = true;

hardware/Arilux.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ bool Arilux::StopHardware()
5959
{
6060
m_stoprequested = true;
6161
try {
62-
if (m_thread && m_thread->joinable())
62+
if (m_thread)
6363
{
6464
m_thread->join();
6565
}

hardware/AtagOne.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ bool CAtagOne::StartHardware()
9898
m_thread = std::shared_ptr<std::thread>(new std::thread(std::bind(&CAtagOne::Do_Work, this)));
9999
m_bIsStarted=true;
100100
sOnConnected(this);
101-
return (m_thread != NULL && m_thread->joinable());
101+
return (m_thread != NULL);
102102
}
103103

104104
bool CAtagOne::StopHardware()
105105
{
106-
if (m_thread != NULL && m_thread->joinable())
106+
if (m_thread != NULL)
107107
{
108108
assert(m_thread);
109109
m_stoprequested = true;

hardware/BleBox.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ bool BleBox::StopHardware()
6161
{
6262
m_stoprequested = true;
6363

64-
if (m_thread && m_thread->joinable())
64+
if (m_thread)
6565
{
6666
m_thread->join();
6767
}
@@ -1194,7 +1194,6 @@ void BleBox::SearchNodes(const std::string &ipmask)
11941194

11951195
for (size_t i = 1; i <= searchingThreads.size(); ++i)
11961196
{
1197-
if (searchingThreads[i - 1]->joinable())
1198-
searchingThreads[i - 1]->join();
1197+
searchingThreads[i - 1]->join();
11991198
}
12001199
}

hardware/Comm5Serial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ bool Comm5Serial::StopHardware()
103103
{
104104
terminate();
105105
m_stoprequested = true;
106-
if (m_thread && m_thread->joinable())
106+
if (m_thread)
107107
{
108108
m_thread->join();
109109
// Wait a while. The read thread might be reading. Adding this prevents a pointer error in the async serial class.

hardware/CurrentCostMeterSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ bool CurrentCostMeterSerial::StopHardware()
7272
{
7373
terminate();
7474
m_stoprequested = true;
75-
if (m_thread && m_thread->joinable())
75+
if (m_thread)
7676
{
7777
m_thread->join();
7878
// Wait a while. The read thread might be reading. Adding this prevents a pointer error in the async serial class.

hardware/CurrentCostMeterTCP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ bool CurrentCostMeterTCP::StartHardware()
5757

5858
//Start worker thread
5959
m_thread = std::shared_ptr<std::thread>(new std::thread(std::bind(&CurrentCostMeterTCP::Do_Work, this)));
60-
return (m_thread != NULL && m_thread->joinable());
60+
return (m_thread != NULL);
6161
}
6262

6363
bool CurrentCostMeterTCP::isConnected()

0 commit comments

Comments
 (0)