Any suggestions, or patches to try async mechanism instead of polling? On Fri, Nov 23, 2018 at 5:37 PM Raveendranath Kondrakunta < raveendranath.kondraku...@gmail.com> wrote:
> Hi, > > I found a function where the thread wakes up every 10ms, On IoT devices, > we except to save power, however this function is waking up every 10ms and > defeating the purpose. We need to relook at the design here. > > void InProcServerWrapper::processFunc() > { > auto cLock = m_csdkLock.lock(); > while(cLock && m_threadRun) > { > OCStackResult result; > > { > std::lock_guard<std::recursive_mutex> lock(*cLock); > result = OCProcess(); > } > > if(OC_STACK_ERROR == result) > { > oclog() << "OCProcess failed with result " << result > <<std::flush; > // ...the value of variable result is simply ignored for > now. > } > > std::this_thread::sleep_for(std::chrono::milliseconds(10)); > } > } > -Ravee > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#10023): https://lists.iotivity.org/g/iotivity-dev/message/10023 Mute This Topic: https://lists.iotivity.org/mt/28292450/21656 Group Owner: iotivity-dev+ow...@lists.iotivity.org Unsubscribe: https://lists.iotivity.org/g/iotivity-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-