Skip to content

Commit

Permalink
Don't capture synchronization context in DiskWriterQueue
Browse files Browse the repository at this point in the history
  • Loading branch information
abereznikov committed Mar 12, 2024
1 parent 4f77be4 commit f8c9c4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LiteDB/Engine/Disk/DiskWriterQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void EnqueuePage(PageBuffer page)

if (_task == null)
{
_task = Task.Factory.StartNew(ExecuteQueue, TaskCreationOptions.LongRunning);
_task = Task.Factory.StartNew(ExecuteQueue, CancellationToken.None, TaskCreationOptions.LongRunning, TaskScheduler.Default);
}
}
}
Expand Down Expand Up @@ -100,7 +100,7 @@ private async Task ExecuteQueue()

_stream.FlushToDisk();

await _queueHasItems.WaitAsync();
await _queueHasItems.WaitAsync().ConfigureAwait(false);
}
}
}
Expand Down

0 comments on commit f8c9c4f

Please sign in to comment.