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

Allow host module re-initialization #95

Merged
merged 2 commits into from
Apr 14, 2023
Merged

Allow host module re-initialization #95

merged 2 commits into from
Apr 14, 2023

Conversation

jasongin
Copy link
Member

Fixes: #93

To resolve the issue, the NativeHost instance keeps track of the .NET TFM and managed host path that were used to initialize it, along with a strong reference to the exports object that was the result of the initialization. If the initialize function is called again with the same parameters then the same exports result is returned.

@jasongin jasongin requested a review from vmoroz April 14, 2023 08:25
Copy link
Contributor

@rijulg rijulg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, waiting to test it out after merge.

@jasongin jasongin merged commit 76ff08b into main Apr 14, 2023
@jasongin jasongin deleted the dev/jasongin/reinit branch April 23, 2023 07:04
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.

Host throws exception when initialized multiple times by JS workers
2 participants