2
0
mirror of synced 2025-02-23 23:08:14 +00:00
Burcu Dogan 7858a6e1a7 sensor: minimize the number of epolls
Drain the event queue between ALooper_pollAll calls. ALooper_pollAll
makes an epoll to see if there is any I/O going on the underlying
resources and is relatively a costly operation. Try to consume the
queue first and block on pollAll again if necessary.

We should stop retrying if timeout occurs and return immediately.

Change-Id: I6e9f85df2dd275fb014f90f13de4f05d776d4b7d
Reviewed-on: https://go-review.googlesource.com/8590
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2015-04-08 03:40:08 +00:00
..