git-svn-id: svn://db.shs.com.ru/pip@646 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -939,6 +939,10 @@ PIConnection::DevicePool::DevicePool(): PIThread(false, 10) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PIConnection::DevicePool::~DevicePool() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void PIConnection::DevicePool::init() {
|
void PIConnection::DevicePool::init() {
|
||||||
if (!isRunning())
|
if (!isRunning())
|
||||||
start(10);
|
start(10);
|
||||||
@@ -1088,14 +1092,12 @@ PIVector<PIIODevice * > PIConnection::DevicePool::boundedDevices(const PIConnect
|
|||||||
|
|
||||||
|
|
||||||
PIConnection::DevicePool::DeviceData::~DeviceData() {
|
PIConnection::DevicePool::DeviceData::~DeviceData() {
|
||||||
if (rthread != 0) {
|
if (rthread) {
|
||||||
rthread->stop();
|
|
||||||
if (!rthread->waitForFinish(1000))
|
|
||||||
rthread->terminate();
|
rthread->terminate();
|
||||||
delete rthread;
|
delete rthread;
|
||||||
rthread = 0;
|
rthread = 0;
|
||||||
}
|
}
|
||||||
if (dev != 0) {
|
if (dev) {
|
||||||
dev->close();
|
dev->close();
|
||||||
delete dev;
|
delete dev;
|
||||||
dev = 0;
|
dev = 0;
|
||||||
|
|||||||
@@ -290,6 +290,7 @@ public:
|
|||||||
struct DeviceData;
|
struct DeviceData;
|
||||||
public:
|
public:
|
||||||
DevicePool();
|
DevicePool();
|
||||||
|
~DevicePool();
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
PIIODevice * addDevice(PIConnection * parent, const PIString & fp, PIIODevice::DeviceMode mode = PIIODevice::ReadWrite, bool start = true);
|
PIIODevice * addDevice(PIConnection * parent, const PIString & fp, PIIODevice::DeviceMode mode = PIIODevice::ReadWrite, bool start = true);
|
||||||
|
|||||||
Reference in New Issue
Block a user