Skip to content

Documentation: Funcky.Async and IAsyncEnumerable chapter - #1025

Merged
FreeApophis merged 2 commits into
mainfrom
docs-async-chapter
Oct 29, 2026
Merged

FreeApophis merged 2 commits into
mainfrom
docs-async-chapter

Conversation

@FreeApophis

Copy link
Copy Markdown
Member

Adds Documentation/src/async.md to the mdBook and links it from SUMMARY.md (after the IEnumerable Extensions chapter), from the Sequence constructors chapter and from the IEnumerable Extensions landing page.

The chapter covers:

  • where the async APIs live: in Funcky on .NET 10 and newer, in Funcky.Async on older frameworks, and that the net10.0 asset of Funcky.Async only forwards to Funcky, so the reference can be dropped;
  • the mental model: Funcky follows the System.Linq.AsyncEnumerable vocabulary, one name per operator with an (item, cancellationToken) delegate, and how to discard the token with (item, _) => …;
  • the lazy operators (AdjacentGroupBy, Chunk, ExclusiveScan, InclusiveScan, Inspect, WhereSelect) and the terminal aggregations (AverageOrNoneAsync, FirstOrNoneAsync, LastOrNoneAsync, SingleOrNoneAsync, MaxOrNoneAsync, MinOrNoneAsync, NoneAsync, PartitionAsync) with their delegate shapes;
  • the migration from the obsolete …Await / …AwaitWithCancellation / …AwaitAsync / …AwaitWithCancellationAsync overloads (obsolete since 3.8.0, removed in 4.0.0, Remove the obsolete Await/AwaitWithCancellation async operators #981): apply the Funcky.Analyzers 2.1.0 code fix for CS0618 solution-wide, what the fix does with method groups and delegate values, and which calls it leaves alone;
  • AsyncSequence, RetryAsync / RetryAwaitAsync, and awaiting Option<Task<T>> / Option<ValueTask<T>> including ConfigureAwait.

Every name and overload was checked against the sources in Funcky/Extensions/AsyncEnumerableExtensions, Funcky/AsyncSequence, Funcky/Functional and Funcky/Monads/Option.

Closes #1018

🤖 Generated with Claude Code

Covers where the async APIs live (Funcky on .NET 10, Funcky.Async on older
targets, type forwards on net10.0), the .NET 10 naming of the asynchronous
operators with (item, cancellationToken) delegates, the lazy and terminal
operator families, the migration from the obsolete …Await names with the
Funcky.Analyzers 2.1.0 CS0618 code fix, AsyncSequence, RetryAsync and
awaiting Option<Task<T>>. Links the chapter from the sequence and
IEnumerable extensions chapters.

Closes #1018

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved documentation errors misstate retargeting compatibility, async-void exception behavior, and supported APIs, and include a broken Memoize link.

5 open issues
What changed in this PR

Adds an async API chapter to the mdBook, addressing #1018 with guidance on package selection, async operators, and migration from obsolete overloads.

Changes:

  • Documents framework-specific packaging, callback conventions, and solution-wide migration.
  • Covers AsyncSequence, asynchronous retry helpers, and awaiting Option values.
  • Adds navigation and cross-links from existing enumerable and sequence documentation.
File Description
Documentation/​src/​SUMMARY.md Adds the async chapter to book navigation.
Documentation/​src/​sequence/​sequence.md Expands async constructor guidance and links to the chapter.
Documentation/​src/​enumerable-extensions/​enumerable-extensions.md Links async counterpart guidance to the new chapter.
Documentation/​src/​async.md Introduces async API documentation and migration examples.

Review effort: Balanced

Comment thread Documentation/src/async.md Outdated
Comment thread Documentation/src/async.md Outdated
Comment thread Documentation/src/async.md Outdated
Comment thread Documentation/src/async.md Outdated
Comment thread Documentation/src/async.md Outdated
Retargeting from Funcky.Async to .NET 10 keeps the package reference working but is not source compatible: AdjacentGroupBy yields IGrouping instead of IAsyncGrouping and Chunk(size) is the base class library's, yielding arrays. An async void lambda does not swallow exceptions, it posts them to the synchronization context or crashes the process. Materialize is a terminal MaterializeAsync on IAsyncEnumerable. The Either and Result partitions do take delegates, synchronous ones. The Memoize link points at the chapter that includes the fragment.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@FreeApophis
FreeApophis merged commit eb00c43 into main Oct 29, 2026
10 checks passed
@FreeApophis
FreeApophis deleted the docs-async-chapter branch October 29, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation: Funcky.Async chapter

3 participants