git-svn-id: svn://db.shs.com.ru/pip@746 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -159,6 +159,24 @@ bool PIIODevice::setOption(PIIODevice::DeviceOption o, bool yes) {
|
||||
}
|
||||
|
||||
|
||||
void PIIODevice::stopThreadedRead() {
|
||||
#ifdef FREERTOS
|
||||
PIThread::stop(true);
|
||||
#else
|
||||
PIThread::terminate();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void PIIODevice::stopThreadedWrite() {
|
||||
#ifdef FREERTOS
|
||||
write_thread.stop(true);
|
||||
#else
|
||||
write_thread.terminate();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void PIIODevice::_init() {
|
||||
opened_ = init_ = thread_started_ = false;
|
||||
raise_threaded_read_ = true;
|
||||
@@ -221,8 +239,12 @@ void PIIODevice::terminate() {
|
||||
thread_started_ = false;
|
||||
if (!init_) return;
|
||||
if (isRunning()) {
|
||||
#ifdef FREERTOS
|
||||
stop(true);
|
||||
#else
|
||||
stop();
|
||||
PIThread::terminate();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user