Bodu.Collections.Concurrent 0.7.0

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

Bodu.Collections.Concurrent

API stability — Stable. The public API surface is committed; breaking changes are reserved for a major-version bump per SemVer.

The thread-safe collection variants of the Bodu collection catalogue: a lock-free bounded MPMC ring buffer, a lock-free split-ordered concurrent set, and a lock-striped bounded cache. The original two types were split out of Bodu.Collections with the namespace unchanged — code written against Bodu.Collections.Generic.Concurrent keeps compiling; only the package reference changes. All collections implement the standard BCL interfaces and ship struct enumerators over best-effort snapshots. The package references Bodu.Collections (and transitively Bodu.Core).

Installation

dotnet add package Bodu.Collections.Concurrent

Targets net8.0. Depends on Bodu.Collections.

Collections

Type Namespace Summary
ConcurrentCircularBuffer<T> Bodu.Collections.Generic.Concurrent Lock-free (Vyukov MPMC) fixed-capacity FIFO ring buffer with optional overwrite-on-full and eviction events
ConcurrentHashSet<T> Bodu.Collections.Generic.Concurrent Lock-free split-ordered concurrent set implementing ISet<T>, with comparer injection and snapshot enumeration
ConcurrentEvictingDictionary<TKey,TValue> Bodu.Collections.Generic.Concurrent Lock-striped bounded cache — the thread-safe variant of EvictingDictionary<TKey,TValue> with all six eviction policies (FIFO/LRU/LFU/MRU/SecondChance/Random), optional TTL expiry, single-flight GetOrAdd, and a post-commit ItemEvicted event. Eviction order is exact per segment, approximate globally

For the single-threaded counterparts (CircularBuffer<T>, EvictingDictionary<TKey,TValue>, Deque<T>, and the wider catalogue), see the Bodu.Collections package.

Testing

The types are verified through the shared contract-test bases in Bodu.Test (collection, set, read-only-collection, enumerator, non-generic, and debug-view contracts) plus concurrency-specific suites: multi-producer/multi-consumer stress runs, overwrite contention, slot-layout and snapshot-stability checks, and — for the evicting dictionary — a differential suite that replays scripted workloads against the non-concurrent EvictingDictionary oracle to pin per-segment eviction parity.

License

MIT — see the repository's license file.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
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
1.0.0 524 9/24/2026
0.7.0 141 9/24/2026
0.6.0 60 9/24/2026
0.5.0 66 9/23/2026