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][ST] trim more MT code #111214

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Jan 8, 2025

Motivation: smaller and more deterministic code for single-threaded applications.

  • throw PlatformNotSupportedException when not IsThreadStartSupported so that we trim more code.
    • It would throw anyway later. This way the linker understand it can trim rest of the implementation.
  • simplify LowLevelLock for ST
  • SpinCountforSpinBeforeWait = 0
  • added FEATURE_SINGLE_THREAD define constant

This PR makes calls to .Wait throw earlier and more consistently

@pavelsavara pavelsavara changed the title [browser][ST] trim more MT code [WASM][ST] trim more MT code Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-VM-threading-mono size-reduction Issues impacting final app size primary for size sensitive workloads
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant