-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace ALooper_pollAll with ALooper_pollOnce (#477)
This commit is sourced from a downstream patch. The incoming NDK r27 removes `ALooper_pollAll` as it can't be called safely. See android/ndk#2020 for more context. While this change strives to introduce as little behavior change as possible, Some behavior changes might be happening. 1. We are failing more explicitly when `ALooper_pollOnce` returns `ALOOPER_POLL_ERROR`. When this error is returned, there is no point in retrying polling in the current thread. 2. Compared with `ALooper_pollAll`, `ALooper_pollOnce` can return more frequently with `ALOOPER_POLL_CALLBACK`. This can lead to "on_idle" logic being executed more frequently. Signed-off-by: Nathan Gauër <brioche@google.com> Co-authored-by: google-yfyang <yfyang@google.com>
- Loading branch information
1 parent
dcb5f06
commit 334178e
Showing
2 changed files
with
26 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters