Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ALooper_pollAll with ALooper_pollOnce #999

Closed
DanAlbert opened this issue Apr 16, 2024 · 1 comment
Closed

Replace ALooper_pollAll with ALooper_pollOnce #999

DanAlbert opened this issue Apr 16, 2024 · 1 comment
Assignees

Comments

@DanAlbert
Copy link
Member

ALooper_pollAll has been (soft) removed from the NDK because the implementation has a race so it can't be used safely. ALooper_pollOnce should be used instead.

@DanAlbert DanAlbert self-assigned this Apr 16, 2024
DanAlbert added a commit to DanAlbert/ndk-samples that referenced this issue Apr 24, 2024
The `pollAll` API was removed because it can't be used safely. The
recommendation is to replace existing calls to `pollAll` with `pollOnce`
with an explicit loop.

There are quite a few other samples that are doing this. Fixing one to
start so I can check with someone that understands the `pollAll` bug so
I don't accidentally copy the same bug, then I'll fix the others.

android#999
@DanAlbert
Copy link
Member Author

Fixed by #1008 and #1009

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant