dotnet / dotnet/reactive

.AsParallel for IAsyncEnumerable()

Open
#1,566 1 comment 3 reactions 0 assignees View on GitHub
[area] Ix
Dominant language
C#
Stars
7.2k
Forks
798
PR merge metrics
No merged PRs in 30d

Description

With regular Linq, I can use ```.AsParallel()``` to distribute my query across multiple cores.

Is there a method like this for IAsyncEnumerable?

I have a list of IAsyncEnumerables and I want to ```SelectMany``` from them and get the results as fast as possible.

Essentially, here's what I want to do:
```
var Batches = (
from x in EnumerateGroups(Iteration).AsAsyncEnumerable().AsParallel() //<-- This right here
from y in ImportManyAsync(x, SuccessIteration, FailureIteration, Token)
from z in y.AsAsyncEnumerable()
select z.Value
)
.BatchEvery(Options.OutputStatusEvery)
.DefaultAwait()
;
```

Is there a way to do that?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.