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] Use auto thread dispatch in HTTP #95370

Merged
merged 25 commits into from
Jan 21, 2024

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Nov 28, 2023

HTTP

  • are now using automatic dispatch to correct thread via [browser][MT] JSImport dispatch to target thread via JSSynchronizationContext #96319
  • are modified to be bit more thread safe and also to not deadlock
  • introduced HttpController helper object on the JavaScript side
  • unified http_wasm_transform_stream_abort into regular abort. Abort request will also abort response if any.
  • renamed WasmFetchResponse to BrowserHttpController
    • moved CallFetch and header construction logic to it.
    • simplified logic of awaiting closePromise and fetchPromise and observing the errors
  • renamed WasmHttpWriteStream to BrowserHttpWriteStream
  • added new unit test into WebWorkerTest which test client usage across thread boundaries.
  • added MT HTTP test to MT smoke tests
  • System.Net.Http.Functional.Tests, now also run xunit on thread pool in MT

Other

  • simplified JSWebWorker
  • fixed setup_proxy_console for early disconnect
  • dropped SynchronizationContextExtension
  • dropped JSHost.CurrentOrMainJSSynchronizationContext

Fixes #96173
Fixes #75123

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

ghost commented Nov 28, 2023

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

Issue Details

null

Author: pavelsavara
Assignees: pavelsavara
Labels:

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

Milestone: 9.0.0

@pavelsavara

This comment was marked as outdated.

@pavelsavara
Copy link
Member Author

/azp run runtime-wasm

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara

This comment was marked as outdated.

@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
Copy link
Member Author

There is [11:24:42] fail: Application has finished with exit code TIMED_OUT but 0 was expected in System.Runtime.InteropServices.JavaScript.Tests
Log

I will work on it as part of #96628

@pavelsavara
Copy link
Member Author

/azp run runtime-wasm

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara
Copy link
Member Author

CI failures are
#97217
thread join issue from #96628
and some random infra issue with System.Net.Mail.Unit.Tests Log

@pavelsavara pavelsavara merged commit 756a138 into dotnet:main Jan 21, 2024
197 of 208 checks passed
@pavelsavara pavelsavara deleted the browser_jsimport_sc_dispatch branch January 21, 2024 10:39
tmds pushed a commit to tmds/runtime that referenced this pull request Jan 23, 2024
Co-authored-by: campersau <buchholz.bastian@googlemail.com>
Co-authored-by: Marek Fišera <mara@neptuo.com>
@github-actions github-actions bot locked and limited conversation to collaborators Feb 21, 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
4 participants