Skip to content

Compile the base package's net11.0 build with runtime async, if a benchmark shows a gain #211

Open

Description

@CaffeinatedCoder

What you're trying to do

Make the async extensions of Option and Result cheaper on .NET 11 without changing their API. In .NET 11 the runtime libraries are compiled with runtime async, and net11.0 needs no preview flag for it (What's new in .NET 11).

What you'd like

The base package's net11.0 build compiled with runtime async (MapAsync, BindAsync, TapAsync, TraverseAsync and the rest), the net10.0 build unchanged.

  • To measure first: how a library opts in (whether <Features>runtime-async=on</Features> is still needed at GA, or is the default for net11.0), and a before/after benchmark of the async extensions. No benchmark gain, no change.
  • What must hold: the documented rule in ResultExtensions.cs that the async members never resume on the caller's SynchronizationContext, tested on net11.0 with a context that records a post.
  • What else must be measured: the Native AOT smoke run on net11.0, and stack traces of a faulted step, which change shape under runtime async. Only exceptions are kept; their messages don't change.

Does it change something that compiles or works today?

No API change. A shared member behaves the same on both targets (decision 120, rule 2), and the tests show it.

Activity

  1. added this to the 2.4.0 milestone on Oct 30, 2026
  2. added
    enhancement
    package/core
    area/option-result
    area/aot
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/aotarea/option-resultenhancementpackage/core

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions