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

[browser][MT] JSType.OneWay fire and forget #98567

Merged
merged 5 commits into from
Feb 18, 2024

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Feb 16, 2024

This will be useful for beginInvokeDotNetFromJS and endInvokeJSFromDotNet which could be fire & forget across threads.

There is new API JSType.OneWay which will need API review later.

Other changes

  • unified order of signature and args on all InvokeJSImport variations.
  • added ReceiverShouldFree to make reasoning easier about who should free the args on heap.
  • renamed mono_wasm_invoke_method to mono_wasm_invoke_jsexport and variations
  • renamed mono_wasm_invoke_import to mono_wasm_invoke_jsimport and variations
  • unified sync and async mono_wasm_invoke_jsimport
  • dropped mono_threads_wasm_async_run_in_ui_thread and variations

Prep for deputy

  • added JSProxyContext.NativeTID which will be different than current thread when we have deputy thread.
  • mono_wasm_invoke_jsexport_async_post and mono_wasm_invoke_jsexport_async_send unused for now
  • split invoke_async_jsexport and invoke_sync_jsexport, both are synchronous until deputy

@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-System.Runtime.InteropServices.JavaScript os-browser Browser variant of arch-wasm labels Feb 16, 2024
@pavelsavara pavelsavara added this to the 9.0.0 milestone Feb 16, 2024
@pavelsavara pavelsavara self-assigned this Feb 16, 2024
@ghost
Copy link

ghost commented Feb 16, 2024

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

Issue Details

This will be useful for beginInvokeDotNetFromJS and endInvokeJSFromDotNet which could be fire & forget across threads.

Author: pavelsavara
Assignees: pavelsavara
Labels:

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

Milestone: 9.0.0

@pavelsavara
Copy link
Member Author

/azp run runtime-wasm

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara
Copy link
Member Author

/azp run runtime-wasm

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara
Copy link
Member Author

/azp run runtime-wasm

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara
Copy link
Member Author

/azp run runtime-wasm

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara pavelsavara marked this pull request as ready for review February 18, 2024 11:07
src/mono/browser/runtime/invoke-js.ts Show resolved Hide resolved
src/mono/browser/runtime/marshal-to-cs.ts Show resolved Hide resolved
@pavelsavara pavelsavara merged commit d7acf9c into dotnet:main Feb 18, 2024
137 of 139 checks passed
@pavelsavara pavelsavara deleted the browser_mt_oneway branch February 18, 2024 11:54
@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-System.Runtime.InteropServices.JavaScript os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants