Make Http2Connection.SendFrameAsync return ValueTask (dotnet/corefx#35426)
authorStephen Toub <stoub@microsoft.com>
Wed, 20 Feb 2019 01:27:49 +0000 (20:27 -0500)
committerGitHub <noreply@github.com>
Wed, 20 Feb 2019 01:27:49 +0000 (20:27 -0500)
commit58d340f4dee5a42cd8f37e5d0d13140359e1cd7a
tree8a429c8b810cabed36f7fc034dca1f26829744c2
parent6f896586c0f62a7fb9f8d75b08ab4670e976eb95
Make Http2Connection.SendFrameAsync return ValueTask (dotnet/corefx#35426)

This method frequently completes synchronously, and in such cases we can avoid the task allocation.

Commit migrated from https://github.com/dotnet/corefx/commit/52993e52f9d3ab30da54884f7c5e0cdea2518e28
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs