![]() |
VOOZH | about |
dotnet add package Soenneker.Queues.Intrusive.Mpsc --version 4.0.22
NuGet\Install-Package Soenneker.Queues.Intrusive.Mpsc -Version 4.0.22
<PackageReference Include="Soenneker.Queues.Intrusive.Mpsc" Version="4.0.22" />
<PackageVersion Include="Soenneker.Queues.Intrusive.Mpsc" Version="4.0.22" />Directory.Packages.props
<PackageReference Include="Soenneker.Queues.Intrusive.Mpsc" />Project file
paket add Soenneker.Queues.Intrusive.Mpsc --version 4.0.22
#r "nuget: Soenneker.Queues.Intrusive.Mpsc, 4.0.22"
#:package Soenneker.Queues.Intrusive.Mpsc@4.0.22
#addin nuget:?package=Soenneker.Queues.Intrusive.Mpsc&version=4.0.22Install as a Cake Addin
#tool nuget:?package=Soenneker.Queues.Intrusive.Mpsc&version=4.0.22Install 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
High-performance intrusive multi-producer / single-consumer (MPSC) queue primitive.
This package provides a lock-free, allocation-free MPSC queue designed for low-level concurrency primitives and async infrastructure. It is intended for advanced usage where control over memory layout, allocation, and synchronization semantics is required.
dotnet add package Soenneker.Queues.Intrusive.Mpsc
IntrusiveMpscQueue<TNode> implements a classic MPSC algorithm using a permanent sentinel (stub) node:
This design is well suited for wait queues, schedulers, async locks, and similar primitives.
Nodes must implement IIntrusiveNode<TNode> or derive from IntrusiveNode<TNode>.
public sealed class WorkItem : IntrusiveNode<WorkItem>
{
public int Id;
}
var stub = new WorkItem();
var queue = new IntrusiveMpscQueue<WorkItem>(stub);
queue.Enqueue(new WorkItem { Id = 42 });
if (queue.TryDequeue(out var item))
{
// process item
}
If stronger dequeue semantics are required (for example, when a producer has advanced the tail but not yet published the link), use TryDequeueSpin.
TryDequeue may return false even when a producer is mid-enqueue; this is expected behavior.This type is not intended as a general-purpose collection.
This queue is appropriate when:
If you need a general-purpose, multi-consumer queue, use System.Threading.Channels or ConcurrentQueue<T> instead.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.22 | 0 | 6/19/2026 |
| 4.0.21 | 94 | 6/5/2026 |
| 4.0.20 | 101 | 6/5/2026 |
| 4.0.19 | 106 | 6/5/2026 |
| 4.0.18 | 109 | 4/23/2026 |
| 4.0.17 | 105 | 4/23/2026 |
| 4.0.16 | 118 | 3/13/2026 |
| 4.0.15 | 108 | 3/12/2026 |
| 4.0.14 | 108 | 3/12/2026 |
| 4.0.13 | 115 | 3/12/2026 |
| 4.0.12 | 107 | 3/12/2026 |
| 4.0.11 | 118 | 3/12/2026 |
| 4.0.10 | 107 | 3/11/2026 |
| 4.0.9 | 104 | 3/10/2026 |
| 4.0.8 | 114 | 3/10/2026 |
| 4.0.7 | 115 | 3/9/2026 |
| 4.0.6 | 107 | 3/9/2026 |
| 4.0.5 | 105 | 3/9/2026 |
| 4.0.3 | 116 | 2/4/2026 |
| 4.0.2 | 113 | 2/4/2026 |
Update dependency Soenneker.Queues.Intrusive.Abstractions to 4.0.15 (#30)