diff --git a/LiteDB/Engine/Disk/DiskWriterQueue.cs b/LiteDB/Engine/Disk/DiskWriterQueue.cs index a7d2a443f..0592cc6b9 100644 --- a/LiteDB/Engine/Disk/DiskWriterQueue.cs +++ b/LiteDB/Engine/Disk/DiskWriterQueue.cs @@ -1,12 +1,7 @@ using System; using System.Collections.Concurrent; -using System.Collections.Generic; -using System.ComponentModel; using System.IO; using System.Linq; -using System.Reflection; -using System.Text; -using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using static LiteDB.Constants; @@ -24,7 +19,7 @@ internal class DiskWriterQueue : IDisposable // async thread controls private Task _task; - private ConcurrentQueue _queue = new ConcurrentQueue(); + private readonly ConcurrentQueue _queue = new ConcurrentQueue(); private int _running = 0; @@ -92,8 +87,6 @@ public void Wait() /// private void ExecuteQueue() { - if (_queue.Count == 0) return; - do { if (_queue.TryDequeue(out var page))