Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[android] Do not try to wake up the RunLoop if a wake is already pending #15330

Merged
merged 1 commit into from
Aug 7, 2019

Conversation

tmpsantos
Copy link
Contributor

@tmpsantos tmpsantos commented Aug 7, 2019

Do not flood the RunLoop with wake up calls, potentially causing writes to the socket to block when internal pipe buffer goes over the limit defined by the system (usually 65536).

Also, write calls are syscalls and will cause a context switch.

Fixes #14740

/cc @alexshalamov that found the issue.

Do not flood the RunLoop with wake up calls, potentially causing the
socket buffer to overflow.

Also, write calls are syscalls and will cause a context switch.
Copy link
Contributor

@alexshalamov alexshalamov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good (updated PR description a bit)
@LukasPaczos what would be the best way to add Android integration test that would exercise this part of code?

@LukasPaczos
Copy link
Member

I'll test the changes out locally and see if I can come up with a test @alexshalamov

@chloekraw
Copy link
Contributor

Amazing 🕵 work, @alexshalamov!

@chloekraw chloekraw added the needs changelog Indicates PR needs a changelog entry prior to merging. label Aug 7, 2019
@chloekraw
Copy link
Contributor

If this fix works, which tickets would it close out?

@LukasPaczos
Copy link
Member

Verified the fix locally, amazing work! Unfortunately, it doesn't seem viable to test it from Java, we'll need a core unit test and the CI integration from https://github.com/mapbox/mapbox-gl-native/issues/15332.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs changelog Indicates PR needs a changelog entry prior to merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

App freezes after downloading tiles, pausing and resuming
4 participants