sunero4 commented on PR #128:
URL: https://github.com/apache/pulsar-dotpulsar/pull/128#issuecomment-1320942559

   It seems like I was a bit too trigger-happy with the pull request after all, 
and should have read the 
[documentation](https://learn.microsoft.com/en-us/dotnet/standard/io/buffers#readonlysequencet)
 for consuming `ReadOnlySequence` a bit closer :) Apparently `Slice` advances 
the enumerator of the `ReadOnlySequence`, making it unusable later on, and the 
correct way of consuming it is in fact to materialize it as an array or using 
the `SequenceReader<byte>`. 
   The documentation does however advise against using the `ToArray` method in 
hot paths, so I might try and play around with using an `ArrayPool` instead. 
For now I'll decline the PR :) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to