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

[wasm][mt] making JSImport work on worker thread #78847

Merged
merged 2 commits into from
Nov 30, 2022

Conversation

pavelsavara
Copy link
Member

This improves initialization of the JS state on the worker thread.
This is just initial work to enable JS interop.

  • sample: added JSImport which would be called from thread
  • fixed missing await on wasm instantiation
  • added preInitWorkerAsync - called from Module.preInit which is atually called
  • added preRunWorker - called after the thread is mono attached
  • remove forced lazy from cwraps (when called from preInit, the memory+wasm+Module is attached already)

Contributes to #77287

- fixed missing await on wasm instantiation
- added preInitWorkerAsync - called from Module.preInit which is atually called
- added preRunWorker - called after the thread is mono attached
- remove forced lazy from cwraps (when called from preInit, the memory+wasm+Module is attached already)
@pavelsavara pavelsavara added this to the 8.0.0 milestone Nov 25, 2022
@pavelsavara pavelsavara self-assigned this Nov 25, 2022
@ghost
Copy link

ghost commented Nov 25, 2022

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

This improves initialization of the JS state on the worker thread.
This is just initial work to enable JS interop.

  • sample: added JSImport which would be called from thread
  • fixed missing await on wasm instantiation
  • added preInitWorkerAsync - called from Module.preInit which is atually called
  • added preRunWorker - called after the thread is mono attached
  • remove forced lazy from cwraps (when called from preInit, the memory+wasm+Module is attached already)

Contributes to #77287

Author: pavelsavara
Assignees: pavelsavara
Labels:

arch-wasm, area-System.Runtime.InteropServices.JavaScript

Milestone: 8.0.0

@pavelsavara
Copy link
Member Author

/azp run runtime-wasm

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara pavelsavara marked this pull request as ready for review November 29, 2022 17:50
Copy link
Member

@maraf maraf left a comment

Choose a reason for hiding this comment

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

LGTM

@pavelsavara
Copy link
Member Author

/azp run runtime-wasm-non-libtests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara
Copy link
Member Author

/azp run runtime-wasm

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara pavelsavara merged commit b49fcc6 into dotnet:main Nov 30, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Dec 31, 2022
@pavelsavara pavelsavara deleted the wasm_jsimport_threads branch September 2, 2024 15:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants