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

Document PillarboxPlayer APIs as supported on the main thread only #932

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

defagos
Copy link
Member

@defagos defagos commented Jul 7, 2024

Description

This PR adds an important warning to PillarboxPlayer main documentation entry point, explicitly stating that corresponding APIs are supported from the main thread only. It also ensures that tracker lifecycle methods are called on the main thread, which was not guaranteed.

Calling PillarboxPlayer APIs from background threads is theoretically possible but requires some work, see #931. Until then it is best to warn developers about the current limitations, which should not change anything in practice (most public Pillarbox APIs are meant to be used from UI code anyway).

Changes made

  • Add documentation warning.
  • Ensure tracker lifecycle methods are called on the main thread.

Checklist

  • APIs have been properly documented (if relevant).
  • The documentation has been updated (if relevant).
  • New unit tests have been written (if relevant).
  • The demo has been updated (if relevant).

@defagos defagos added the enhancement New feature or request label Jul 7, 2024
@defagos defagos self-assigned this Jul 7, 2024
@defagos defagos added this pull request to the merge queue Jul 8, 2024
Merged via the queue into main with commit 594bf84 Jul 8, 2024
6 checks passed
@defagos defagos deleted the main-thread-support branch July 8, 2024 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants