Open
Description
When you call .WithCancellation(cancellationToken)
on IAsyncEnumerable<'T>
you get System.Runtime.CompilerServices. ConfiguredCancelableAsyncEnumerable<'T>
which is not currently supported.
So that this code does not work
static member ToFlatListAsync<'Source>(source: IQueryable<'Source>, [<Optional>] cancellationToken: CancellationToken) = task {
let builder = ImmutableArray.CreateBuilder<'Source>()
do!
source.AsAsyncEnumerable().WithCancellation(cancellationToken)
|> TaskSeq.iterAsync (fun x -> builder.Add(x))
return builder.ToImmutable();
}