-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
System.Linq.Parallel OrderedPipeliningMergeEnumerator.MoveNext is using API unsupported on browser #43752
Comments
Tagging subscribers to this area: @eiriktsarpalis, @jeffhandley |
Tagging subscribers to this area: @tarekgh |
|
More similar references found:
|
These are all the guts of PLINQ. Really it's just that PLINQ isn't supported on browser, all up. Either the whole assembly should be annotated as unsupported, or if there's a goal of having it be supported, browser should have its own effectively nop implementation that just delegates everything to Enumerable. |
As per the suggestion and discussion, marked the entire assembly unsupported |
I think we should do what @stephentoub suggested and replace it with an implementation that delegates to Enumerable. |
@akoeplinger does your team expect to do this by Aug 17th |
@lewing @steveisok what do you think? |
I started working on this but it's not clear to me whether this work is actually valuable. If I enable the PLINQ tests on the existing codebase (i.e. main), about 27000 of them run and pass successfully. With my new explicit implementation (all the PLINQ methods manually delegated to regular LINQ) I get over 2000 test failures due to things like differences in exception handling and bugs in the tests. Are we sure PLINQ doesn't actually mostly work in the browser as-is? Do we have applications that are broken that I can look into and identify fixes for? I don't think replacing PLINQ wholesale is actually the right solution unless we really need to do it, it makes the code incredibly messy. |
I guess we never hit the case of runtime/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/MergeExecutor.cs Lines 65 to 77 in 8bfb45a
So the |
That makes sense. I think I'll make a new branch and try just chasing down any place where it might try to fork threads and see how many of those need modification to ensure they never will. I expect there's code out there that will do things like try to use synchronization primitives inside select lambdas or something, but that can't possibly work no matter what I do. |
You can remove this from the Directory.Build.props and it should tell you about methods that are unsupported on Browser:
|
Yeah, my branch has that removed and then I chased down all the analyzer warnings (there were something like a thousand of them) - right now my branch builds with no warnings. |
#58227 suppresses all the analyzer warnings and all the tests still pass, so that might be all that's necessary here? I would love to know if there are any developers who've contacted us to ask for PLINQ. |
System.Linq.Parallel OrderedPipeliningMergeEnumerator.MoveNext is using API unsupported on browser (Monitor.Wait();). It needs to be fixed so it works without
Monitor.Wait()
on browserOrderedPipeliningMergeEnumerator.TryWaitForElement
It is callingMonitor.Wait()
which is unsupported on browser. Which is further called from OrderedPipeliningMergeEnumerator.MoveNext which is overridingIEnumerator.MoveNext(...)
Originally posted by @buyaa-n in #43363 (comment)
The text was updated successfully, but these errors were encountered: