jtmueller / Collections.Pooled

Fast, low-allocation ports of List, Dictionary, HashSet, Stack, and Queue using ArrayPool and Span.
MIT License
544 stars 48 forks source link

Add equivalent of CollectionsMarshal.GetValueRef for PooledDictionary. #42

Open grokys opened 3 years ago

grokys commented 3 years ago

Is your feature request related to a problem? Please describe.

.NET 6 exposes a low-level method to get a ref to the entry in a Dictionary<,>: https://github.com/dotnet/runtime/pull/49388

It would be nice to have an equivalent to this in the pooled collections.

Describe the solution you'd like

Something like PooledCollectionsMarshal.GetValueRefOrNullRef?