ready to test
This commit is contained in:
@@ -1114,7 +1114,10 @@ PIVector<PIIODevice * > PIConnection::DevicePool::boundedDevices(const PIConnect
|
||||
|
||||
PIConnection::DevicePool::DeviceData::~DeviceData() {
|
||||
if (rthread) {
|
||||
rthread->terminate();
|
||||
rthread->stop();
|
||||
rthread->interrupt();
|
||||
if (!rthread->waitForFinish(1000))
|
||||
rthread->terminate();
|
||||
delete rthread;
|
||||
rthread = nullptr;
|
||||
}
|
||||
@@ -1146,8 +1149,13 @@ void __DevicePool_threadReadDP(void * ddp) {
|
||||
}
|
||||
if (dev->isClosed()) {
|
||||
if (!dev->open()) {
|
||||
piMSleep(dev->reopenTimeout());
|
||||
return;
|
||||
PITimeMeasurer tm;
|
||||
int timeout = dev->reopenTimeout();
|
||||
while (tm.elapsed_m() < timeout) {
|
||||
if (dd->rthread->isStopping())
|
||||
return;
|
||||
piMSleep(50);
|
||||
}
|
||||
}
|
||||
}
|
||||
PIByteArray ba;
|
||||
|
||||
Reference in New Issue
Block a user