[OPTIMIZING]

This commit is contained in:
max
2025-09-10 02:55:06 +02:00
parent 03631cd0c8
commit ef6ca0ee07
4 changed files with 8 additions and 14 deletions

View File

@@ -22,10 +22,11 @@ public class CircularBuffer <T>
Capacity = capacity;
_buffer = new T[Capacity];
_channel = Channel.CreateUnbounded<T>(new UnboundedChannelOptions
_channel = Channel.CreateBounded<T>(new BoundedChannelOptions(Capacity)
{
SingleReader = false,
SingleWriter = false,
FullMode = BoundedChannelFullMode.DropOldest
});
}