On Wednesday 15 April 2015 11:38:38 Lankswert, Patrick wrote: > > -----Original Message----- > > From: iotivity-dev-bounces at lists.iotivity.org [mailto:iotivity-dev- > > bounces at lists.iotivity.org] On Behalf Of Thiago Macieira > > Sent: Wednesday, April 15, 2015 2:30 PM > > To: iotivity-dev at lists.iotivity.org > > Subject: Re: [dev] glib > > > > On Wednesday 15 April 2015 16:48:18 Light, John J wrote: > > > A well-constructed select loop can include polling (if that is needed) > > > or external events (if that is needed). I've done both, and they work > > fine. > > > > John > > > > No polling, please. If you wake up, you had better have something to do. > > On the embedded side, many things are polled since we cannot block. > Although we sometimes can sleep (low power state) until an interrupt.
That's exactly it: we should always try to find a way to avoid polling and sleep as much as possible. If we have to deal with APIs that don't support asynchronous notifications, then fine. But if it isn't the case or the API in question is one of our doing. In those cases, we should really not poll and instead should fix the API. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4447 bytes Desc: not available URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150415/cb080e4a/attachment.p7s>
