mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Allow threads to reopen after closing
This commit is contained in:
@@ -31,8 +31,10 @@ void Communication::spawnThreads() {
|
||||
}
|
||||
|
||||
void Communication::joinThreads() {
|
||||
closing = true;
|
||||
if(readTaskThread.joinable())
|
||||
readTaskThread.join();
|
||||
closing = false;
|
||||
}
|
||||
|
||||
bool Communication::close() {
|
||||
@@ -40,7 +42,6 @@ bool Communication::close() {
|
||||
return false;
|
||||
|
||||
isOpen = false;
|
||||
closing = true;
|
||||
joinThreads();
|
||||
|
||||
return impl->close();
|
||||
|
||||
Reference in New Issue
Block a user