- Added
AsyncSeq.withCancellation— returns a newAsyncSeqthat passes the givenCancellationTokentoGetAsyncEnumerator, overriding whatever token would otherwise be supplied. MirrorsTaskSeq.withCancellationand is useful when consuming sequences from libraries (e.g. Entity Framework) that accept a cancellation token throughGetAsyncEnumerator. Part of ongoing design-parity work with FSharp.Control.TaskSeq (see #277).
- Performance:
filterAsync— replacedasyncSeq-builder implementation with a direct optimised enumerator, reducing allocation and generator overhead. - Performance:
chooseAsync— fallback (non-AsyncSeqOp) path now uses a direct optimised enumerator instead of theasyncSeqbuilder. - Performance:
foldAsync— fallback (non-AsyncSeqOp) path now uses a direct loop instead of composingscanAsync+lastOrDefault, avoiding intermediate sequence allocations. - Benchmarks: added
AsyncSeqFilterChooseFoldBenchmarksandAsyncSeqPipelineBenchmarksbenchmark classes to measurefilterAsync,chooseAsync,foldAsync,toArrayAsync, and common multi-step pipelines.
- Added
AsyncSeq.mapFoldAsync— maps each element using an asynchronous folder that also threads an accumulator state, returning both the array of results and the final state; mirrorsSeq.mapFold. - Added
AsyncSeq.mapFold— synchronous variant ofAsyncSeq.mapFoldAsync, mirroringSeq.mapFold. - Added
AsyncSeq.allPairs— returns an async sequence of all pairs from two input sequences (cartesian product); the second source is fully buffered before iteration, mirroringSeq.allPairs. - Added
AsyncSeq.rev— returns a new async sequence with all elements in reverse order; the entire source sequence is buffered before yielding, mirroringSeq.rev.
- Added
AsyncSeq.splitAt— splits a sequence at the given index, returning the firstcountelements as an array and the remaining elements as a newAsyncSeq. MirrorsSeq.splitAt. The source is enumerated once. - Added
AsyncSeq.removeAt— returns a new sequence with the element at the specified index removed, mirroringSeq.removeAt. - Added
AsyncSeq.updateAt— returns a new sequence with the element at the specified index replaced by a given value, mirroringSeq.updateAt. - Added
AsyncSeq.insertAt— returns a new sequence with a value inserted before the element at the specified index (or appended if the index equals the sequence length), mirroringSeq.insertAt.
- Added
AsyncSeq.isEmpty— returnstrueif the sequence contains no elements; short-circuits after the first element, mirroringSeq.isEmpty. - Added
AsyncSeq.tryHead— returns the first element asoption, orNoneif the sequence is empty, mirroringSeq.tryHead(equivalent to the existingAsyncSeq.tryFirst). - Added
AsyncSeq.except— returns a new sequence excluding all elements present in a given collection, mirroringSeq.except. - Added
AsyncSeq.findIndex— returns the index of the first element satisfying a predicate; raisesKeyNotFoundExceptionif no match, mirroringSeq.findIndex. - Added
AsyncSeq.tryFindIndex— returns the index of the first element satisfying a predicate asoption, orNoneif not found, mirroringSeq.tryFindIndex. - Added
AsyncSeq.findIndexAsync— async-predicate variant ofAsyncSeq.findIndex; raisesKeyNotFoundExceptionif no match. - Added
AsyncSeq.tryFindIndexAsync— async-predicate variant ofAsyncSeq.tryFindIndex; returnsoption. - Added
AsyncSeq.sortWith— sorts the sequence using a custom comparison function, returning an array, mirroringSeq.sortWith.
- Added
AsyncSeq.last— returns the last element of the sequence; raisesInvalidOperationExceptionif empty, mirroringSeq.last. - Added
AsyncSeq.item— returns the element at the specified index; raisesArgumentExceptionif out of bounds, mirroringSeq.item. - Added
AsyncSeq.tryItem— returns the element at the specified index asoption, orNoneif the index is out of bounds, mirroringSeq.tryItem.
- Added
AsyncSeq.findAsync— async-predicate variant ofAsyncSeq.find; raisesKeyNotFoundExceptionif no match, mirroringSeq.find. - Added
AsyncSeq.existsAsync— async-predicate variant ofAsyncSeq.exists, mirroringSeq.exists. - Added
AsyncSeq.forallAsync— async-predicate variant ofAsyncSeq.forall, mirroringSeq.forall.
- Added
AsyncSeq.head— returns the first element of the sequence; raisesInvalidOperationExceptionif empty, mirroringSeq.head. - Added
AsyncSeq.iteri— iterates the sequence calling a synchronous action with each element's index, mirroringSeq.iteri. - Added
AsyncSeq.find— returns the first element satisfying a predicate; raisesKeyNotFoundExceptionif no match, mirroringSeq.find. - Added
AsyncSeq.tryFindAsync— async-predicate variant ofAsyncSeq.tryFind, returning the first matching element asoption. - Added
AsyncSeq.tail— returns the sequence without its first element, mirroringSeq.tail.
- Added
AsyncSeq.zip3,AsyncSeq.zipWith3, andAsyncSeq.zipWithAsync3— combinators for zipping three async sequences, mirroringSeq.zip3(PR #254).
async sequence (PR #241).
- Added
AsyncSeq.reduceandAsyncSeq.reduceAsync— folds without a seed value, mirroringSeq.reduce(PR #242). - Added
AsyncSeq.sumBy,AsyncSeq.sumByAsync,AsyncSeq.average,AsyncSeq.averageBy, andAsyncSeq.averageByAsync— numeric aggregation combinators mirroring the correspondingSeqmodule functions (PR #245). - Added
AsyncSeq.min,AsyncSeq.max,AsyncSeq.minBy,AsyncSeq.maxBy,AsyncSeq.minByAsync, andAsyncSeq.maxByAsync— min/max aggregation combinators mirroringSeq.min/Seq.max/Seq.minBy/Seq.maxBy(PR #243). - Added
AsyncSeq.distinct,AsyncSeq.distinctBy,AsyncSeq.distinctByAsync,AsyncSeq.countBy,AsyncSeq.countByAsync,AsyncSeq.exactlyOne, andAsyncSeq.tryExactlyOne— set-membership and cardinality combinators mirroring the correspondingSeqmodule functions (PR #249).
- Breaking:
AsyncSeq<'T>is nowSystem.Collections.Generic.IAsyncEnumerable<'T>(the BCL type).ofAsyncEnumandtoAsyncEnumare now identity functions and marked[<Obsolete>]. Code that directly calls.GetEnumerator()/.MoveNext()must switch to.GetAsyncEnumerator(ct)/.MoveNextAsync()(#230, PR #231). - Added
YieldFromoverload forseq<'T>inasyncSeqcomputation expression —yield! itemsnow works whenitemsis aseq<'T>(#123, PR #236). - Added
[<CompilerMessage>]warning togroupByandgroupByAsyncto alert users that results must be consumed with a parallel combinator to avoid deadlock (#125, PR #235). - Added
AsyncSeq.mapAsyncUnorderedParallelThrottledfor throttled unordered parallel mapping (#31, PR #225). - Fixed
ofAsyncEnumdeadlock on single-threaded runtimes such as Blazor WASM (#152, PR #229). - Updated
PackageLicenseExpression(removed deprecatedPackageLicenseUrl) and updatedMicrosoft.Bcl.AsyncInterfacesto 10.0.3 (#168, PR #228).
- Quick summary of changes:
- Performance improvements: optimized
iterAsyncanditeriAsync; optimizedcollect,mapAsyncandunfoldAsync; fixed append memory leak (Issue #35). - Added
mapAsyncUnorderedParallelfor improved parallel performance. - Added
AsyncSeq.chunkByandAsyncSeq.chunkByAsyncfor grouping consecutive elements by key (#156, PR #222). AsyncSeq.mergeAllnow acceptsseq<AsyncSeq<'T>>instead oflist<AsyncSeq<'T>>for broader compatibility (#165, PR #221).- Set up BenchmarkDotNet for systematic benchmarking; performance benchmarks show measurable improvements (addresses Round 1 & 2 of #190).
- Build/CI updates: configuration and build-step updates.
- Performance improvements: optimized
- Release latest
- Sorting functions #126
- Update publishing
- Restore netstandard2.0 (and thereby .NET Framework 4.6.1+) compatibility
- Update build env versions to current recommendations
- Adjust to ensure all tests pass and eliminate warnings in vscode (ionide) and visual studio
- Include .fsi files into Fable package path #118
- Move to only netstandard 2.1
- Adding ofIQueryable #112
- Adding .NET IAsyncEnumerable conversion functions (ofAsyncEnum and toAsyncEnum) #96
- Rename toList and toArray to toListSynchronously and toArraySynchronously
- Add ofSeqAsync and concat
- Improve parallelism of AsyncSeq.cache
- Fix packaging issues
- Reference FSharp.Core 4.3 for nestandard builds
- Fix packaging issues
- Reference FSharp.Core 4.3 for nestandard builds
- Fix packaging issues
- Reference FSharp.Core 4.3 for nestandard builds
- Target .NET Standard
- Target .NET Standard
- AsyncSeq.mergeAll min-max fairness
- Improve performance of internal Async.chooseTasks function which improves performance of AsyncSeq.bufferByCountAndTime, etc (#73)
- Fix previous package deployment
- NEW: AsyncSeq.bufferByTime
- BUG: Fixed head of line blocking in AsyncSeq.mapAsyncParallel
- NEW: AsyncSeq.takeWhileInclusive
- NEW: AsyncSeq.replicateUntilNoneAsync
- NEW: AsyncSeq.iterAsyncParallel
- NEW: AsyncSeq.iterAsyncParallelThrottled
- BUG: Fixed exception propagation in AsyncSeq.mapAsyncParallel
- Fix bug #63 in AsyncSeq.unfold >> AsyncSeq.choose
- Fixed bug in AsyncSeq.cache when used by interleaved consumers.
- AsyncSeq.zipWithAsyncParallel (and variants)
- Improved asyncSeq workflow performance via bindAsync generator (@pragmatrix)
- Much improved append performance.
- Direct implementation of unfoldAsync as IAsyncEnumerable, with chooseAsync, mapAsync and foldAsync overrides
- Add portable7 profile
- Fix bug in Async.cache #33
- Fix leak in AsyncSeq.append and other derived generators
- Add AsyncSeq.sum, length, contains, exists, forall, tryPick, tryFind
- Simplify ofObservableBuffered and toBlockingSeq
- Move to IAsyncEnumerable model to support try/finally and try/with
- Rename replicate to replicateInfinite
- Rename toList to toListAsync
- Rename toArray to toArrayAsync
- Rename zipWithIndexAsync to mapiAsync
- Rename interleave to interleaveChoice
- Add interleave
- Add mergeChoice
- Fix performance of mergeAll
- Add init, initInfinite
- Add initAsync, initInfiniteAsync, replicateInfinite
- Add RequireQualifiedAccess to AsyncSeq
- Add AsyncSeq.getIterator (unblocks use of AsyncSeq in FSharpx.Async)
- Cancellable AsyncSeq.toBlockingSeq
- Fix AsyncSeq.scanAsync to also return first state
- Add a signature file
- AsyncSeq got extracted as separate project and is now a dependency - fsprojects/FSharpx.Async#24
- Renamed to FSharp.Control.AsyncSeq
- Remove surface area
- Hide Nil/Cons from representation of AsyncSeq
- Added Async.bindChoice, Async.ParallelIgnore, AsyncSeq.zipWithAsync, AsyncSeq.zappAsync, AsyncSeq.threadStateAsync, AsyncSeq.merge, AsyncSeq.traverseOptionAsync, AsyncSeq.traverseChoiceAsync
- Added AsyncSeq.toList, AsyncSeq.toArray, AsyncSeq.bufferByCount, AsyncSeq.unfoldAsync, AsyncSeq.concatSeq, AsyncSeq.interleave
- Copied the AsyncSeq from FSharpx.Async
- BUGFIX: AsyncSeq.skipWhile skips an extra item - #2
- BUGFIX: AsyncSeq.skipWhile skips an extra item - #2
- BUGFIX: AsyncSeq.toBlockingSeq does not hung forever if an exception is thrown and reraise it outside - #21