Skip to content

Reduce heap allocations for asynchronously-completing methods #17391

@divega

Description

@divega

.NET Core includes some helpers to implement nearly allocation-free IAsyncEnumerable<T> iterators.

One way to take advantage of this feature is to use async interators support in C# in the implementation. Another one is to use ManualResetValueTaskSourceCore<T> manually.

See https://github.com/dotnet/corefx/issues/32664 for more details.

EDIT BY @roji: investigate opportunities for using the new AsyncMethodBuilderOverrideAttribute and PoolingAsyncValueTaskMethodBuilders, dotnet/runtime#49903

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions