Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ private Trace()
}

public static CorrelationManager CorrelationManager =>
Volatile.Read(ref field) ??
Interlocked.CompareExchange(ref field, new(), null) ??
field;
field ?? Interlocked.CompareExchange(ref field, new(), null) ?? field;

/// <devdoc>
/// <para>Gets the collection of listeners that is monitoring the trace output.</para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,7 @@ internal TResult GetResultCore(bool waitCompletionNotification)
/// the default constructor on the factory type.
/// </remarks>
public static new TaskFactory<TResult> Factory =>
Volatile.Read(ref field) ??
Interlocked.CompareExchange(ref field, new(), null) ??
field;
field ?? Interlocked.CompareExchange(ref field, new(), null) ?? field;

/// <summary>
/// Evaluates the value selector of the Task which is passed in as an object and stores the result.
Expand Down
Loading