-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
Add async overloads for ByteString.WriteTo() #6228
Add async overloads for ByteString.WriteTo() #6228
Conversation
@jtattermusch Would you be interested in reviewing this? @anandolee usually reviews C# changes but is on vacation for the next month. |
@acozzette Would you mind adding the "C#" tag here and in my other PR? The mergeable-bot fails on that missing label, and I can't add labels |
Same as #6230 (comment) can you describe the use case? |
Good point and I'll move toward that. In this case I'm working in a net472 codebase, the .Span property is not visible in this case, so I was optimizing for what was available to minimize thread waits. |
@jtattermusch Memory only supported on netcore2.1+. I'd prefer to get this change in for downlevel net472 optimization. |
Same response as on #6230 (comment) |
@jtattermusch This is different from #6230 as it simply adds the ability to write to a stream without holding a thread context. I closed that PR, but this one still seems useful by itself. |
Once we add the System.Memory dependency for all targets (see #6317), it seems that this will no longer be useful, because you can grab byteString.Span and use that to write to the Stream? If that's the case, let's close because then there wouldn't be much point in adding new APIs. |
Related to #3166