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 (#10022): 
https://lists.iotivity.org/g/iotivity-dev/message/10022
Mute This Topic: https://lists.iotivity.org/mt/28292450/21656
Group Owner: [email protected]
Unsubscribe: https://lists.iotivity.org/g/iotivity-dev/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to