Skip to content

Switch to main thread for interface callback #144

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

Merged
merged 4 commits into from
Jun 12, 2023
Merged

Conversation

jasongin
Copy link
Member

Fixes #141

When calling a .NET interface adapter for a JS object, the generated marshalling code uses the JSSynchronizationContext on the JSReference to switch back to the JS thread if necessary, before getting the referenced JS object and calling the method.

The same problem exists for collection adapters, but this PR does not address collections.

@jasongin jasongin requested a review from vmoroz June 11, 2023 19:02
@jasongin jasongin merged commit dd1bcef into main Jun 12, 2023
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.

Automatically switch to main thread when calling back to JS
2 participants