Asynchronous stream is a new feature introduced in .NET Standard 2.1 or C# 8. It is based on interface – IAsyncEnumerable<T> . It can be used with async/await. The main benefit with Async Stream is that the it can shorten the response time and reduce the usage of computing resource. The client (or the consumer) will get the a "stream" of items asynchronously, therefore act on each one item as soon as it is produced.
Here is an example in my GitHub:
No comments:
Post a Comment