Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
benaadams committed May 6, 2019
1 parent 38407f6 commit 6d9a50a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1497,9 +1497,10 @@ bool IAsyncResult.CompletedSynchronously
/// </remarks>
public static TaskFactory Factory { get; } = new TaskFactory();

// Is a Task{VoidTaskResult} so it can be shared with AsyncTaskMethodBuilder
internal static readonly Task<VoidTaskResult> s_cachedCompleted = new Task<VoidTaskResult>(false, default, (TaskCreationOptions)InternalTaskOptions.DoNotDispose, default);
/// <summary>Gets a task that's already been completed successfully.</summary>
public static Task CompletedTask { get; } = s_cachedCompleted;
public static Task CompletedTask => s_cachedCompleted;

/// <summary>
/// Provides an event that can be used to wait for completion.
Expand Down

0 comments on commit 6d9a50a

Please sign in to comment.