Skip to content

[RuntimeAsync] ConfigureAwait(bool) is not optimized for ValueTask-returning method. #119617

@VSadov

Description

@VSadov

Observed while enabling rt async in Libraires partition - #119432

While the optimization should not be needed for correctness, thus not the first priority to fix, it is certainly not the intention to leave this unoptimized.

The reason why we do not recognize the await pattern in Await(call).ConfigureAwait(false) when call returns ValueTask is because we expect ConfigureAwait applied to the result, but the IL contains stloc;ldloca in between.

The importer (impMatchTaskAwaitPattern) needs to learn about this.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions