Repository navigation
Release 1.3.0 - #3
Merged
Merged
Conversation
…mps for O(1) append
…overloads, and nearest ties
…, swapped ranges, DateTime overloads, ordering, and nearest ties
…fety - Fix race condition in TemporalDictionary.Add where concurrent RemoveOlderThan/RemoveRange could orphan a list, silently losing items - Fix GetNearest tie-breaking in TemporalMultimap and TemporalSegmentedArray to prefer the later item (>= time), consistent with all other collections - Prevent IndexOutOfRangeException in TemporalSegmentedArray when segmentCapacity == 1 by requiring minimum capacity of 2 - Remove unused TimestampOnlyComparerImpl from TemporalDictionary - Update related tests to match corrected tie-breaking behavior
… to TemporalQueue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 1.3.0
Summary
This PR merges
developintomainfor v1.3.0. It addsTimeProvidersupport across all collections and a newTemporalCache, and fixes several concurrency and correctness bugs. It does not intentionally change existing public behavior.✨ New features
TemporalCache<TKey, TValue>: new collection with TTL and sliding expiration (with benchmarks and README docs).TemporalQueue:TryDequeue/TryPeek.Try*variantsTemporalIntervalTree: new methods that make the semantics explicit:GetOverlapping(from, to)returns intervals that overlap the range.CountOverlapping(from, to)counts the same intervals asGetOverlapping.RemoveEndedBefore(cutoff)removes intervals withEnd < cutoff.Start-based orEnd-based) are now documented.⚡ Performance
TemporalDictionary: range queries and removals use binary search;Addappends in O(1) thanks to monotonic timestamps.TemporalMultimap: global range queries use a k-way merge.🐛 Bug fixes
TemporalIntervalTree: distinct values with the same hash code are no longer dropped or removed by mistake.TemporalCircularBuffer.Add,TemporalQueue.Enqueue,TemporalDictionary.AddandTemporalMultimap.AddValuenow keep items in chronological order when several threads write at once.TemporalDictionary: pruning no longer removes a key that another thread has just re-created.TemporalSegmentedArray: no longer throwsIndexOutOfRangeExceptionwhen adding afterTrimExcess.TemporalPriorityQueue: no longer throws onnullpriorities; they are sorted first.TimeNormalization: catches onlyArgumentExceptioninstead of every exception; docs fixed.GetNearesttie-breaking, a monotonic sequence tie-breaker, and fixes for concurrency races, an overflow risk and dead code.🧪 Tests
global.jsonsodotnet testruns on Microsoft.Testing.Platform (required by the .NET 10 SDK).TrimExcess, interval-tree semantics).net9.0andnet10.0.📦 Packaging & docs
PackageReleaseNotes.assets/logo.svg) shown in the README.assets/icon.png, 128×128).TemporalIntervalTree: some methods use overlap, others use onlyStartorEnd. For example,CountInRangecounts byStart, whileGetInRangeuses overlap. This is now documented; making it consistent is planned for 2.0 and will be a breaking change.