Open ctaggart opened 6 years ago
Nice replacement for ArraySegment with vastly superior utility - plays nice with all container types and enumerators. Could consider moving ZeroCopyBuffer, et al. to this, but that will break compat with older versions of mono, Unity and CLR.
Introducing .NET Core 2.1 Flagship Types: Span T and Memory T https://www.codemag.com/Article/1807051/Introducing-.NET-Core-2.1-Flagship-Types-Span-T-and-Memory-T
System.IO.Pipelines: High performance IO in .NET https://blogs.msdn.microsoft.com/dotnet/2018/07/09/system-io-pipelines-high-performance-io-in-net/
Sweet! Shouldn't be too hard to replace ZeroCopyBuffer
with PipeReader
+ PipeWriter
and get far better buffer control (and probably better performance).
Note, though, that Unity has problems with SignelR on iOS. No idea if this carries over to System.IO.Pipelines
. Note also that await
support is required, so older Unity would be a non-starter.
LMK if there's strong interest. Maybe I can give it a go on a branch...
https://twitter.com/funcOfJoe/status/943671450677927936
https://twitter.com/khellang/status/943778553111433216
cc @jhugard