Skip to content

Fix Android thread priority #1280

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

chucknology
Copy link
Contributor

Android threads are Linux threads which differ from the POSIX standard.
Calling pthread_setschedparam does not produce the intended effect on Android.

Android threads are Linux threads which differ from the POSIX standard. Calling pthread_setschedparam does not produce the intended effect on Android.
@paulfd
Copy link
Member

paulfd commented Mar 17, 2025

@atsushieno you have more Android experience than I do, if you find some time to have a look I will defer to your judgment :) Thanks!

@atsushieno
Copy link
Contributor

atsushieno commented Mar 18, 2025

@paulfd okay, but I was not aware of this platform-specific difference either, so I'm reviewing from that stand point.

@chucknology Reviewing without actually running code so far - I agree to the change in general, but it seems that the intent of setting priority there is so that it gives "moderately higher" priority than normal thread, not "highest" (-20). The default value for config::backgroundLoaderPthreadPriority used in non-Android code is 50, so I would say -10 is better (if config is not considered).

IfUnless there is still reason to set -20 (or it does not make sense to use values like -10), I would suggest @paulfd to make another commit to make such one-liner change and merge it.

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

Successfully merging this pull request may close these issues.

3 participants