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

Change from fixed rate to fixed delay #332

Merged
merged 3 commits into from May 2, 2024

Conversation

breedx-splk
Copy link
Contributor

The linter is currently catching a problem with our use of scheduleAtFixedRate:

Error: Use of scheduleAtFixedRate is strongly discouraged because it can lead to unexpected behavior when Android processes become cached (tasks may unexpectedly execute hundreds or thousands of times in quick succession when a process changes from cached to uncached); prefer using scheduleWithFixedDelay [DiscouragedApi]

This PR changes it per the recommendation and should get the build passing again. I don't see anything immediately problematic with using delay instead of rate, and it will avoid problems in the cached case.

@breedx-splk breedx-splk requested a review from a team as a code owner April 30, 2024 20:20
@breedx-splk breedx-splk merged commit 29aa5cd into open-telemetry:main May 2, 2024
3 checks passed
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.

None yet

2 participants