Skip to content

Commit

Permalink
Seal more Tsavorite internals (#341)
Browse files Browse the repository at this point in the history
* Good type hygiene & potential minor perf. benefits

Co-authored-by: Ted Hart <[email protected]>
  • Loading branch information
PaulusParssinen and TedHartMS authored Apr 29, 2024
1 parent 023f1fe commit 8cf25f6
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libs/storage/Tsavorite/cs/src/core/Allocator/ErrorList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Tsavorite.core
{
class ErrorList
internal sealed class ErrorList
{
private List<CommitInfo> errorList;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Tsavorite.core
/// </summary>
/// <typeparam name="Key"></typeparam>
/// <typeparam name="Value"></typeparam>
class MemoryPageScanIterator<Key, Value> : ITsavoriteScanIterator<Key, Value>
internal sealed class MemoryPageScanIterator<Key, Value> : ITsavoriteScanIterator<Key, Value>
{
readonly Record<Key, Value>[] page;
readonly long pageStartAddress;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Tsavorite.core
{
sealed class PendingFlushList
internal sealed class PendingFlushList
{
public readonly LinkedList<PageAsyncFlushResult<Empty>> list;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Tsavorite.core
/// Shared work queue that ensures one worker at any given time. Uses FIFO ordering of work.
/// </summary>
/// <typeparam name="T"></typeparam>
class WorkQueueFIFO<T> : IDisposable
internal sealed class WorkQueueFIFO<T> : IDisposable
{
const int kMaxQueueSize = 1 << 30;
readonly ConcurrentQueue<T> _queue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Tsavorite.core
/// Shared work queue that ensures one worker at any given time. Uses LIFO ordering of work.
/// </summary>
/// <typeparam name="T"></typeparam>
class WorkQueueLIFO<T> : IDisposable
internal sealed class WorkQueueLIFO<T> : IDisposable
{
const int kMaxQueueSize = 1 << 30;
readonly ConcurrentStack<T> _queue;
Expand Down
2 changes: 1 addition & 1 deletion libs/storage/Tsavorite/cs/src/core/Device/AsyncPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Tsavorite.core
/// Supports sync get (TryGet) for fast path
/// </summary>
/// <typeparam name="T"></typeparam>
public class AsyncPool<T> : IDisposable where T : IDisposable
internal sealed class AsyncPool<T> : IDisposable where T : IDisposable
{
readonly int size;
readonly Func<T> creator;
Expand Down

0 comments on commit 8cf25f6

Please sign in to comment.