Skip to content
This repository was archived by the owner on May 11, 2024. It is now read-only.

Commit 5cbd964

Browse files
committed
fix: remove unecessary static locks
1 parent 8b56bb8 commit 5cbd964

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

SMLogging/BackgroundFileTraceListener.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ private void StopBackgroundFlushing()
265265

266266
private readonly ConcurrentQueue<Event> _queue = new ConcurrentQueue<Event>();
267267
private CancellationTokenSource _workerCts;
268-
private static readonly object _workerLock = new object();
268+
private readonly object _workerLock = new object();
269269
private bool _maxQueueSizeReached = false;
270270

271271
#endregion

SMLogging/TraceListenerBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ protected virtual void Initialize()
413413
}
414414

415415
/// <summary>
416-
/// Ensures the the trace listener has been initialized.
416+
/// Ensures the trace listener has been initialized.
417417
/// </summary>
418418
protected void EnsureInitialized()
419419
{
@@ -488,7 +488,7 @@ protected void ApplyConfiguration()
488488

489489
private bool _hasConfiguration = false;
490490
private bool _isInitialized = false;
491-
private static readonly object _initializeLock = new object();
491+
private readonly object _initializeLock = new object(); //TODO: static?
492492

493493
private const string _defaultTraceFormat = "{DateTime:yyyy-MM-dd} {DateTime:HH:mm:ss.FFF} {Message}";
494494
private const string _defaultTraceDataDelimiter = " ";

0 commit comments

Comments
 (0)