Skip to content

Commit

Permalink
Merge pull request #2317 from m-omerovic/bugfix-DiskWriterQueue-stops…
Browse files Browse the repository at this point in the history
…-working

Thanks @m-omerovic. I will do some tests and release a new version
  • Loading branch information
mbdavid authored Jul 20, 2023
2 parents a384eb0 + c3ab124 commit c96a393
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions LiteDB/Engine/Disk/DiskWriterQueue.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -24,7 +19,7 @@ internal class DiskWriterQueue : IDisposable
// async thread controls
private Task _task;

private ConcurrentQueue<PageBuffer> _queue = new ConcurrentQueue<PageBuffer>();
private readonly ConcurrentQueue<PageBuffer> _queue = new ConcurrentQueue<PageBuffer>();

private int _running = 0;

Expand Down Expand Up @@ -92,8 +87,6 @@ public void Wait()
/// </summary>
private void ExecuteQueue()
{
if (_queue.Count == 0) return;

do
{
if (_queue.TryDequeue(out var page))
Expand Down

0 comments on commit c96a393

Please # to comment.