Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
When using Swift from a Java-hosted process, the host environment may need to integrate Swift's main executor with the platform's event loop or another execution mechanism. Without that integration, asynchronous work that switches to the main actor can stop making progress, whether it is called through a Swift library's public API or used internally.
This change helps swift-java users discover the requirement and consider the appropriate integration for their environment.
Changes
Explain the execution requirements in Java-hosted processes
The jextract documentation explains that Java hosts may need to integrate the main executor. Because the integration depends on the host environment, it links to the Android page for Android-specific details.
Describe integration with the Android UI thread
The Android documentation points to an implementation that runs Swift's main actor on the Android UI thread as one example of integration.
Link to the Android documentation from the README
Android is an important use case for swift-java, and users should be able to find guidance before encountering this issue. The existing README does not enumerate individual limitations, so this change respects that structure and adds only a link to the Android documentation where Android is already mentioned.
Related Links