Skip to content
Merged
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 @@ -4,6 +4,7 @@
#define TRACE
using System;
using System.Collections;
using System.Threading;

namespace System.Diagnostics
{
Expand All @@ -19,18 +20,11 @@ private Trace()
}

private static CorrelationManager? s_correlationManager;
public static CorrelationManager CorrelationManager
{
get
{
if (s_correlationManager == null)
{
s_correlationManager = new CorrelationManager();
}

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

/// <devdoc>
/// <para>Gets the collection of listeners that is monitoring the trace output.</para>
Expand Down