mbed Connector Interface simplification API on top of mbed-client
Fork of mbedConnectorInterfaceV3 by
NOTE:
This repo has been replaced with https://github.com/ARMmbed/mbedConnectorInterface. No further updates will occur with this repo. Please use the github repo instead. Thanks!
Diff: source/ThreadedResourceObserver.cpp
- Revision:
- 122:4072e03884e4
- Parent:
- 93:9ec5d0fa62dd
--- a/source/ThreadedResourceObserver.cpp Fri Mar 31 06:21:29 2017 +0000 +++ b/source/ThreadedResourceObserver.cpp Thu Jul 13 18:48:54 2017 +0000 @@ -31,12 +31,7 @@ this->setObserving(false); // DEBUG - if (sleep_time > 0) { - this->logger()->log("ThreadedResourceObserver being used for %s (sleep_time: %d ms)",resource->getFullName().c_str(),sleep_time); - } - else { - this->logger()->log("ThreadedResourceObserver being used for %s",resource->getFullName().c_str()); - } + this->logger()->log("ThreadedResourceObserver being used for %s (sleep_time: %d ms)",resource->getFullName().c_str(),sleep_time); // start the thread by invoking the thread task... this->m_observation_thread.start(callback(this,&ThreadedResourceObserver::observation_task)); @@ -48,7 +43,7 @@ this->m_observation_thread.terminate(); } - // thread task method + // observation task method void ThreadedResourceObserver::observation_task() { while(true) { Thread::wait(this->getSleepTime()); @@ -73,7 +68,7 @@ // halt the underlying observer mechanism void ThreadedResourceObserver::halt() { - m_observation_thread.terminate(); + this->m_observation_thread.terminate(); } #endif // CONNECTOR_USING_THREADS \ No newline at end of file