Skip to content

Make TimeProviderTaskExtensions WaitAsync run continuations synchronously like Delay #104654

Open
@Snaaio

Description

@Snaaio

This was already solved for TimeProviderTaskExtensions Delay in #85326 (PR #90489). See the rationale there.

I think this should be fixed for WaitAsync as well, because of the same rationale (and now also for consistency with Delay).

Therefore I propose to change:
https://github.com/dotnet/runtime/blob/cd9cc877d157684dd69ccc4d2cabaa60368b1524/src/libraries/Microsoft.Bcl.TimeProvider/src/System/Threading/Tasks/TimeProviderTaskExtensions.cs
public WaitAsyncState(CancellationToken cancellationToken) : base(TaskCreationOptions.RunContinuationsAsynchronously)
to:
public WaitAsyncState(CancellationToken cancellationToken)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions