Skip to content

Switch to main thread for interface callback - #144

Merged
Jason Ginchereau (jasongin) merged 4 commits into
mainfrom
dev/jasongin/cb-thread
Jun 12, 2023
Merged

Switch to main thread for interface callback#144
Jason Ginchereau (jasongin) merged 4 commits into
mainfrom
dev/jasongin/cb-thread

Conversation

@jasongin

Copy link
Copy Markdown
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.

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