Soenneker.Extensions.ConcurrentQueues.Strings 11.0.32

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Extensions.ConcurrentQueues.Strings --version 11.0.32
                    
NuGet\Install-Package Soenneker.Extensions.ConcurrentQueues.Strings -Version 11.0.32
                    
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.Extensions.ConcurrentQueues.Strings" Version="11.0.32" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.ConcurrentQueues.Strings" Version="11.0.32" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.ConcurrentQueues.Strings" />
                    
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.Extensions.ConcurrentQueues.Strings --version 11.0.32
                    
#r "nuget: Soenneker.Extensions.ConcurrentQueues.Strings, 11.0.32"
                    
#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.Extensions.ConcurrentQueues.Strings@11.0.32
                    
#: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.Extensions.ConcurrentQueues.Strings&version=11.0.32
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.ConcurrentQueues.Strings&version=11.0.32
                    
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

alternate text is missing from this package README image Soenneker.Extensions.ConcurrentQueues.Strings

Reads the final string from a ConcurrentQueue<string> enumeration snapshot without copying the queue to an array.

Installation

dotnet add package Soenneker.Extensions.ConcurrentQueues.Strings

Usage

using Soenneker.Extensions.ConcurrentQueues.Strings;

var queue = new ConcurrentQueue<string>();
queue.Enqueue("first");
queue.Enqueue("second");

string? tail = queue.GetTail(); // "second"

GetTail() enumerates a moment-in-time snapshot and returns its last item, or null when the snapshot is empty. It does not dequeue or otherwise mutate the queue.

The operation is O(n), not O(1). It avoids ToArray() and a full array copy, but the framework's snapshot enumerator may allocate and retains access to the observed queue segments for the duration of enumeration.

The result is observational only: another thread can dequeue that item immediately, and enqueues after snapshot creation are not reflected. Do not use it to make a check-then-act decision or to consume work. Use TryPeek() for the head, TryDequeue() for atomic consumption, or maintain separate synchronized state if frequent tail access is a requirement.

Although the queue is annotated for non-null strings, a null can still be inserted by unchecked or legacy code. In that case a null tail is indistinguishable from an empty queue through this API.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net11.0

    • No dependencies.

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
11.0.35 85 11/18/2026
11.0.34 95 11/11/2026
11.0.33 88 11/10/2026
11.0.32 109 10/27/2026
11.0.31 100 10/26/2026
11.0.30 97 10/26/2026
4.0.29 105 10/14/2026
4.0.28 103 10/14/2026
4.0.23 101 10/12/2026
4.0.22 107 10/12/2026
4.0.21 96 10/11/2026
4.0.20 111 9/24/2026
4.0.19 117 9/15/2026
4.0.18 113 9/12/2026
4.0.17 126 8/30/2026
4.0.16 131 8/29/2026
4.0.15 146 7/27/2026
4.0.14 138 7/16/2026
4.0.13 147 6/18/2026
4.0.12 139 6/5/2026
Loading failed

Remove redundant framework conditions