Question about waitForPauseToComplete() blocking behavior #3192
aliaschoondy
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
While reviewing AxmolPlayer.java, I noticed that waitForPauseToComplete() can block indefinitely while waiting for mNativePauseComplete:
During a code review, it was suggested that an indefinite wait on the Android lifecycle path could potentially cause the main thread to remain blocked if the latch is never released.
I experimented with the following change:
I do not currently have ANR traces or a reproducible failure case. This was suggested as a defensive improvement to avoid waiting indefinitely on the UI thread.
Before using or contributing this change, I’d like to understand:
AxmolPlayer.java
All reactions