News for hackers. Stuff that matters.
Re:.NET Core gRPC by merb on Tuesday September 24, 2019 @06:13PM (#21065183)
nope async streams weren't really possible before without an unnecessary allocation.

i.e. a List<Task<T>> is not the same as an AsyncEnumerable<T>. List<Func<Task<T>>> would be more equivalent, but you needed to have a List<T> which you need to fill beforehand.

Re:.NET Core gRPC by SideburnsOfDoom on Wednesday September 25, 2019 @03:43AM (#21068662)
>nope async streams weren't really possible before without an unnecessary allocation.

You would have to define a few custom types. I have written code that looks something like

  while (! ctx.IsCancellationRequested)
  {
    var data = await source.GetData();  
    await Process(data);  
  }
Where source is an interface that we have defined. This is not much more complex than an async enumerable.

It's definitely possible, and if you save an allocation then that's a step up, but not a game changer for most business process.