Use IAsyncEnumerable instead of IAsyncStreamReader
See original GitHub issueWe should consider using the new C# 8 feature IAsyncEnumerable
for streaming RPC calls.
This may need some changes in the Grpc.Core and Grpc.Core.Api packages as well cc @jtattermusch
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:14 (13 by maintainers)
Top Results From Across the Web
How do I retrieve streaming results using Grpc in .Net Core?
According to the gRPC docs, interface IAsyncStreamReader does not have a ReadAllAsync() method.
Read more >Create gRPC client libraries - gRPC for WCF Developers
NET gRPC client libraries, there's a ReadAllAsync extension method for IAsyncStreamReader<T> that creates an IAsyncEnumerable<T> interface.
Read more >IAsyncEnumerable with yield in C# - Code Maze
Let's learn about IAsyncEnumerable and the way to iterate over an IEnumerable collection asynchronously with the yield keyword.
Read more >Asynchronous data streaming with .NET Core 3.0 gRPC ...
The new interfaces IAsyncEnumerable<T> and IAsyncEnumerator<T> ... Streaming data is possible using the IServerStreamWriter that abstracts ...
Read more >Async Streams with IAsyncEnumerable<T> in .NET Core 3
It exposes an enumerator that has a MoveNextAsync() method that can awaited. This means the producer can make asynchronous calls in between ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi folks,
As a heads up, we’ve released Ix Async 4.0 preview, which uses the BCL
IAsyncEnumerable
types and provides the LINQ operators for those. As a result of this, Ix Async 4 is a breaking change over 3.x. That said, we do provide support for usingIAsyncEnumberable
on .NET 4.5 and .NET Standard 2.0 should you need to target those platforms.Closed with https://github.com/grpc/grpc-dotnet/pull/438