Open.Collections
2.7.0
See the version list below for details.
dotnet add package Open.Collections --version 2.7.0
NuGet\Install-Package Open.Collections -Version 2.7.0
<PackageReference Include="Open.Collections" Version="2.7.0" />
paket add Open.Collections --version 2.7.0
#r "nuget: Open.Collections, 2.7.0"
// Install Open.Collections as a Cake Addin #addin nuget:?package=Open.Collections&version=2.7.0 // Install Open.Collections as a Cake Tool #tool nuget:?package=Open.Collections&version=2.7.0
Synchronized Collections
Keeping in mind that without an exclusive lock of some kind, the data can change from one operation to the next.
These classes are provided to help with simple operations that don't rely on lengthy exclusive locking.
Some methods are available that assist with exclusive access:
.IfContains(item, action)
.IfNotContains(item, action)
.Snapshot()
.ForEach(action, useSnapshot)
.Export(destination)
.CopyTo(array, arrayIndex)
.Modify(action)
A "snapshot" is simply a copy of the collection at a given moment that can then be operated on while the underlying collection can continue to mutate.
Reads
Any operation that the collection cannot be changing (adding/removing) while executing.
ie. .Contains(item)
Writes
Any operation that will change (add/remove an entry in) the collection.
Lock Synchronized
Most of these classes synchronize access very fast when a simple Monitor (lock) is used properly.
Best to use these classes when expecting a mix of read/write but with a majority of writes.
Read-Write Synchronized
These classes use a ReaderWriterLockSlim
to synchronize read-write access and can be faster in some specific cases.
Best to use these classes when expecting a mix of read/write but with a majority of reads and typically of a smaller size.
Benchmarks
Important Observations:
- Be sure to benchmark the 'Release' configuration as the difference in performance versus 'Debug' can be dramatic.
- Observe results on different machines with different core counts.
- As collection sizes increase, performance behavior changes. For example, for smaller collection sizes (~1000 or less) Read-Write synchronization wins most of the time. But larger than that, a 'lock' for writes begins to out perform.
Product | Versions 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Open.Threading (>= 1.5.3)
-
.NETStandard 2.1
- Open.Threading (>= 1.5.3)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Open.Collections:
Package | Downloads |
---|---|
PGCG.commonItems
Package Description |
|
Open.Numeric.Primes
Methods and extensions for prime number detection and discovery. Part of the "Open" set of libraries. |
|
Open.Collections.Numeric
Useful set of extensions for processing collections of numerical data. Part of the "Open" set of libraries. |
|
Open.Evaluation.Core
A framework for evaluating complex formulas. Part of the "Open" set of libraries. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
4.0.4 | 0 | 11/23/2024 |
4.0.3 | 0 | 11/22/2024 |
4.0.2 | 251 | 11/17/2024 |
4.0.1 | 127 | 11/17/2024 |
4.0.0 | 63 | 11/17/2024 |
3.2.0 | 10,295 | 11/22/2023 |
3.1.5 | 609 | 11/5/2023 |
3.1.4 | 129 | 11/4/2023 |
3.1.3 | 333 | 10/28/2023 |
3.1.2 | 18,619 | 9/12/2022 |
3.1.1 | 2,937 | 8/7/2022 |
3.1.0 | 815 | 4/20/2022 |
3.0.2 | 436 | 8/7/2022 |
3.0.1 | 445 | 4/17/2022 |
3.0.0 | 2,439 | 4/12/2022 |
2.12.10 | 1,297 | 3/4/2022 |
2.12.9 | 486 | 2/25/2022 |
2.12.8 | 714 | 10/13/2021 |
2.12.7 | 385 | 9/29/2021 |
2.12.5 | 460 | 9/21/2021 |
2.12.4 | 397 | 8/23/2021 |
2.12.3 | 399 | 8/21/2021 |
2.12.2 | 450 | 7/12/2021 |
2.12.1 | 426 | 7/9/2021 |
2.10.1 | 743 | 6/30/2021 |
2.10.0 | 433 | 6/29/2021 |
2.8.0 | 50,968 | 7/17/2020 |
2.7.2 | 13,646 | 1/4/2020 |
2.7.1 | 859 | 1/3/2020 |
2.7.0 | 18,280 | 7/5/2019 |