Soenneker.Utils.ConcurrentCircularQueue 3.0.23

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Utils.ConcurrentCircularQueue --version 3.0.23
                    
NuGet\Install-Package Soenneker.Utils.ConcurrentCircularQueue -Version 3.0.23
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Utils.ConcurrentCircularQueue" Version="3.0.23" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Utils.ConcurrentCircularQueue" Version="3.0.23" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Utils.ConcurrentCircularQueue" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Utils.ConcurrentCircularQueue --version 3.0.23
                    
#r "nuget: Soenneker.Utils.ConcurrentCircularQueue, 3.0.23"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Utils.ConcurrentCircularQueue@3.0.23
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Utils.ConcurrentCircularQueue&version=3.0.23
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.ConcurrentCircularQueue&version=3.0.23
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Utils.ConcurrentCircularQueue

A thread-safe collection type for a fixed length of elements, overwriting the oldest element

Installation

dotnet add package Soenneker.Utils.ConcurrentCircularQueue

Usage

Creating an Instance

Instantiate a ConcurrentCircularQueue<T> object by specifying the maximum size of the queue. Optionally, asynchronous locking is available for perfect .Contains().

// Creates a queue with a maximum size of 3.
var myQueue = new ConcurrentCircularQueue<int>(3, locking: false);

Enqueueing Items

Add an item to the queue. If the queue has reached its maximum size, the oldest item will be removed.

await myQueue.Enqueue(1);
await myQueue.Enqueue(2);
await myQueue.Enqueue(3);
await myQueue.Enqueue(4);

// The queue now contains 2, 3, and 4.

Dequeueing Items

Remove and return the oldest item from the queue.

(bool success, int result) = await myQueue.TryDequeue();

Checking If an Item Exists

Determine if a specific item is in the queue.

bool exists = await myQueue.Contains(item);

Count

Retrieve the current number of items in the queue.

int currentCount = await myQueue.Count();
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.56 399 6/27/2025
3.0.55 567 5/27/2025
3.0.53 235 5/7/2025
3.0.52 168 5/5/2025
3.0.51 142 5/5/2025
3.0.50 147 5/5/2025
3.0.49 523 4/8/2025
3.0.48 144 4/5/2025
3.0.47 122 4/4/2025
3.0.46 205 3/11/2025
3.0.45 203 3/1/2025
3.0.44 125 2/18/2025
3.0.43 156 2/10/2025
3.0.42 111 2/7/2025
3.0.41 105 2/7/2025
3.0.40 200 1/27/2025
3.0.39 104 1/23/2025
3.0.38 119 1/21/2025
3.0.37 95 1/20/2025
3.0.36 87 1/14/2025
3.0.35 105 1/10/2025
3.0.34 101 1/10/2025
3.0.33 406 1/2/2025
3.0.32 110 12/31/2024
3.0.31 127 12/31/2024
3.0.30 102 12/31/2024
3.0.29 99 12/24/2024
3.0.28 111 12/18/2024
3.0.27 100 12/16/2024
3.0.26 166 12/3/2024
3.0.25 119 12/1/2024
3.0.24 126 11/19/2024
3.0.23 111 11/14/2024
2.1.22 402 11/8/2024
2.1.21 660 9/27/2024
2.1.20 134 9/23/2024
2.1.19 172 9/17/2024
2.1.18 227 9/9/2024
2.1.17 195 9/5/2024
2.1.16 315 8/20/2024
2.1.15 488 7/9/2024
2.1.14 103 7/8/2024
2.1.13 111 7/8/2024
2.1.12 325 5/25/2024
2.1.11 132 5/25/2024
2.1.10 139 5/22/2024
2.1.9 187 4/28/2024
2.1.8 132 4/27/2024
2.1.7 223 4/12/2024
2.1.6 124 4/12/2024
2.1.5 367 3/13/2024
2.1.4 297 3/3/2024
2.1.3 150 3/3/2024
2.1.2 140 3/3/2024
2.1.1 156 3/2/2024