Skip to content

[RuntimeAsync] Awaiting a configured ValueTaskSource may end up running in a wrong context. #120709

@VSadov

Description

@VSadov

ValueTaskSource can be configured to not run continuations in the current context (or scheduler).
That takes precedence over what awaiter wants.

For example an IO.Pipe can be configured to run callbacks/continuations in default/threadpool context. In such case immediate users of the IO.Pipe do not need to do ConfigureAwait(false).

Runtime async always considers what awaiter wants. In this case it results in testcase hangs infinitely.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions