Skip to content

Adding Image.RawPoll & fixing a couple polling bugs#129

Open
strangelydim wants to merge 1 commit intomasterfrom
ebowden/image-blockpoll-rawpoll
Open

Adding Image.RawPoll & fixing a couple polling bugs#129
strangelydim wants to merge 1 commit intomasterfrom
ebowden/image-blockpoll-rawpoll

Conversation

@strangelydim
Copy link
Copy Markdown

  • Added Image.RawPoll; same semantics as Java.
  • Added a public FileStream accessor for LogBuffers, enabling use of zero-copy Socket.SendFile (via SafeFileHandle) if desired.
  • Image.BlockPoll was missing a "!" in "if (_isClosed)", so it previously would only advance the subscriber position if the image was closed (and then maybe crash). Fixed.
  • Image.BlockPoll was missing 32-bit int overflow handling for the case of (offset + blockLengthLimit) being > int.MaxValue. Fixed.

New: Added a public FileStream accessor for LogBuffers, enabling use of zero-copy Socket.SendFile (via SafeFileHandle) if desired.
Bug: Image.BlockPoll was missing a "!" in "if (_isClosed)", so it previously would only advance the subscriber position if the image _was_ closed (and then maybe crash). Fixed.
Bug: Image.BlockPoll was missing 32-bit int overflow handling for the case of (offset + blockLengthLimit) being > int.MaxValue. Fixed.
@strangelydim strangelydim requested a review from JPWatson May 1, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant