-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ndk/looper: Deprecate
poll_all*()
and document implied wake results
[Upstream clarified] that due to limitations in `ALooper`, the `poll*()` functions may not be able to distinguish an explicit `wake()` call from any other wakeup source, including callbacks, timeouts, fd events or even errors. Any return value from these functions should be treated as if a `Poll::Wake` event is also returned. While this is not only problematic to tell a wake apart from other events, it makes it impossible for the `poll_all*()` variants to return correctly as they will keep looping internally on callbacks (which are subsuming a wake event). According to [upstream `ALooper_pollAll()` documentation] this is considered "not safe" and the function is no longer allowed to be called. [Upstream clarified]: android/ndk#2020 [upstream `ALooper_pollAll()` documentation]: https://developer.android.com/ndk/reference/group/looper#alooper_pollall
- Loading branch information
Showing
1 changed file
with
25 additions
and
2 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