Soenneker.Utils.ConcurrentCircularQueue
3.0.40
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Soenneker.Utils.ConcurrentCircularQueue --version 3.0.40
NuGet\Install-Package Soenneker.Utils.ConcurrentCircularQueue -Version 3.0.40
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.40" />
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.40" />
<PackageReference Include="Soenneker.Utils.ConcurrentCircularQueue" />
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.40
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Utils.ConcurrentCircularQueue, 3.0.40"
#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.40
#: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.40
#tool nuget:?package=Soenneker.Utils.ConcurrentCircularQueue&version=3.0.40
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Nito.AsyncEx (>= 5.1.2)
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 | 408 | 6/27/2025 |
3.0.55 | 570 | 5/27/2025 |
3.0.53 | 237 | 5/7/2025 |
3.0.52 | 170 | 5/5/2025 |
3.0.51 | 144 | 5/5/2025 |
3.0.50 | 149 | 5/5/2025 |
3.0.49 | 524 | 4/8/2025 |
3.0.48 | 145 | 4/5/2025 |
3.0.47 | 123 | 4/4/2025 |
3.0.46 | 206 | 3/11/2025 |
3.0.45 | 204 | 3/1/2025 |
3.0.44 | 126 | 2/18/2025 |
3.0.43 | 156 | 2/10/2025 |
3.0.42 | 112 | 2/7/2025 |
3.0.41 | 106 | 2/7/2025 |
3.0.40 | 201 | 1/27/2025 |
3.0.39 | 105 | 1/23/2025 |
3.0.38 | 120 | 1/21/2025 |
3.0.37 | 97 | 1/20/2025 |
3.0.36 | 88 | 1/14/2025 |
3.0.35 | 106 | 1/10/2025 |
3.0.34 | 102 | 1/10/2025 |
3.0.33 | 407 | 1/2/2025 |
3.0.32 | 111 | 12/31/2024 |
3.0.31 | 128 | 12/31/2024 |
3.0.30 | 103 | 12/31/2024 |
3.0.29 | 100 | 12/24/2024 |
3.0.28 | 112 | 12/18/2024 |
3.0.27 | 101 | 12/16/2024 |
3.0.26 | 167 | 12/3/2024 |
3.0.25 | 120 | 12/1/2024 |
3.0.24 | 127 | 11/19/2024 |
3.0.23 | 112 | 11/14/2024 |
2.1.22 | 403 | 11/8/2024 |
2.1.21 | 661 | 9/27/2024 |
2.1.20 | 135 | 9/23/2024 |
2.1.19 | 173 | 9/17/2024 |
2.1.18 | 228 | 9/9/2024 |
2.1.17 | 196 | 9/5/2024 |
2.1.16 | 316 | 8/20/2024 |
2.1.15 | 489 | 7/9/2024 |
2.1.14 | 104 | 7/8/2024 |
2.1.13 | 112 | 7/8/2024 |
2.1.12 | 326 | 5/25/2024 |
2.1.11 | 133 | 5/25/2024 |
2.1.10 | 140 | 5/22/2024 |
2.1.9 | 188 | 4/28/2024 |
2.1.8 | 133 | 4/27/2024 |
2.1.7 | 224 | 4/12/2024 |
2.1.6 | 125 | 4/12/2024 |
2.1.5 | 368 | 3/13/2024 |
2.1.4 | 298 | 3/3/2024 |
2.1.3 | 151 | 3/3/2024 |
2.1.2 | 141 | 3/3/2024 |
2.1.1 | 157 | 3/2/2024 |