-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[browser][ST] Harden Stream to never call blocking .Wait() #123357
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
Conversation
|
Tagging subscribers to 'size-reduction': @eerhardt, @SamMonoRT, @marek-safar |
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
|
|
@stephentoub could you please help me figure out why is Please see test failure in comment above and the simple change on this PR. I see What could be done about it ? |
|
I guess in all single-threaded cases, the semaphore would be open, so there would be no actual blocking. And that's how it doesn't fail without this PR. |
It's emulating the legacy behavior in BeginRead/Write that's been there since .NET Framework 1.x. Rather than throwing on that path, I think it'd be better to just change serializeAsynchronously to always be true when in a single threaded browser build. We could also consider taking the breaking change to just always have it be true everywhere; we haven't thus far out because these are legacy code paths we really don't want folks using, and so we haven't wanted to absorb the breaking change risk. |
|
Thanks! |
.Wait()of any type is impossible to implement in single-threaded browser.[UnsupportedOSPlatform("browser")]PlatformNotSupportedExceptionThis is attempt to throw earlier and allow IL trimmer to throw away part of the wait subsystem.
Together with #123329 and #123326