-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Amortize StreamPipeReader ReadAsync calls #39450
Amortize StreamPipeReader ReadAsync calls #39450
Conversation
b1caddb
to
0480d0d
Compare
Raised issue for Json failure https://github.com/dotnet/corefx/issues/39451 |
src/System.IO.Pipelines/src/System/IO/Pipelines/StreamPipeReader.cs
Outdated
Show resolved
Hide resolved
83e7d5c
to
db29225
Compare
src/System.IO.Pipelines/src/System/IO/Pipelines/StreamPipeReader.cs
Outdated
Show resolved
Hide resolved
src/System.IO.Pipelines/src/System/IO/Pipelines/StreamPipeReader.cs
Outdated
Show resolved
Hide resolved
Another concern I have is test coverage, how many tests this new code path? |
1135099
to
866a947
Compare
That's with adding new test to check for throws on concurrent reads |
7e783ef
to
8a4e64f
Compare
@@ -4,7 +4,7 @@ | |||
<Configurations>netstandard-Debug;netstandard-Release</Configurations> | |||
<!-- We only plan to use this ref in netcoreapp. For all other netstandard compatible frameworks we should use the lib | |||
asset instead. --> | |||
<PackageTargetFramework Condition="'$(TargetGroup)' == 'netstandard'">netcoreapp2.0</PackageTargetFramework> | |||
<PackageTargetFramework Condition="'$(TargetGroup)' == 'netstandard'">netcoreapp3.0</PackageTargetFramework> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joperezr would this be a correct change? Were some R2R issues with this package previously for ASP.NET that were fixed with #38731
ASP.NET now currently only targets netcoreapp3.0 and I was having packaging issues trying include a reference for ManualResetValueTaskSourceCore
until I reached this current state. While it complies and packages, is it correct for ASP.NET's packaging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mm I'm not sure why you would want to do this change, even if ASP.NET is targeting netcoreapp3.0, if they reference the package they would still get the netcoreapp2.0 asset resolved, which is what you want here right? I don't have full context on this change but I don't think doing this is correct. cc: @ericstj
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would want ASP.NET to resolve the netcoreapp3.0 asset; don't want a netcoreapp2.0 asset as it needs the extra downlevel Microsoft.Bcl.AsyncInterfaces
assembly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it won't be a netcoreapp2.0 asset, it will be a netstandard reference assembly and it will be the same one you will get no matter how you package it. If you really want to not depend on AsyncInterfaces, then you would need to cross compile the reference assembly for netcoreapp3.0. What this line here is doing, is simply telling our infrastructure to grab the assembly that targets netstandard2.0 and package it as if it was cross-compiled for netcoreapp2.0, but it still has the same dependencies. What you really want here, is to add a netcoreapp3.0 target on the configurations.props of this ref project so that we actually target netcoreapp3.0 and won't have the dependency. Does that make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you prefer, I'm happy to push a change directly in your PR to fix this configuration issue and to make sure that the package is built correctly and that you won't get AsyncInterfaces dependency in ASP.NET.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love that! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, that last changed I pushed should fix this and produce the right package.
8a4e64f
to
bef7c43
Compare
@stephentoub I assume this is post 3.0? |
From my perspective, yes. |
src/System.IO.Pipelines/src/System/IO/Pipelines/StreamPipeReader.cs
Outdated
Show resolved
Hide resolved
14d07e2
to
31bb136
Compare
I love this change but want to figure out the bcl.async thing. |
Think is fixed now? |
82401ef
to
6051a3e
Compare
Commenting to revive this PR. Seems like this was halted just as a matter of waiting post 3.0. cc: @anurse @jkotalik as area owners and @benaadams as PR creator |
Packaging is still not happy with it :( |
Reference assemblies need to use ProjectReferences in most cases. Only exceptions are for frameworks that aren't building any more (eg: past NETCoreApps and NETStandards), in which case we've disabled those configurations and restore them from past packages. |
Probably want to hold on this for now until dotnet/coreclr#26310 is evaluated |
Gonna close @benaadams |
Current
PR
Resolves https://github.com/dotnet/corefx/issues/39258