Skip to content

add ResponseArrayPool#3104

Open
pairbit wants to merge 3 commits into
StackExchange:marc/cyclebufferpoolfrom
pairbit:responseArrayPool
Open

add ResponseArrayPool#3104
pairbit wants to merge 3 commits into
StackExchange:marc/cyclebufferpoolfrom
pairbit:responseArrayPool

Conversation

@pairbit

@pairbit pairbit commented Jun 17, 2026

Copy link
Copy Markdown

No description provided.

@pairbit pairbit mentioned this pull request Jun 17, 2026
5 tasks
@mgravell

Copy link
Copy Markdown
Collaborator

The change

- static StackExchange.Redis.Lease<T>.Create(int length, bool clear = true) -> StackExchange.Redis.Lease<T>!
+static StackExchange.Redis.Lease<T>.Create(int length, bool clear = true, System.Buffers.ArrayPool<T>? pool = null) -> StackExchange.Redis.Lease<T>!

is a hard "nope" - that would smash binary compatibility; at the minimum, we would need to add this via an overload. However, I wonder whether we should instead allow the least to be backed by a union of T[] / IMemoryOwner<T> (presumably via a single object field), and for the byte case we might use the existing response buffer. Thoughts?

@pairbit

pairbit commented Jun 17, 2026

Copy link
Copy Markdown
Author

for the byte case we might use the existing response buffer. Thoughts?

perfect!

@pairbit

pairbit commented Jun 17, 2026

Copy link
Copy Markdown
Author

I have updated Lease, but I am having trouble passing the IMemoryOwner object to the ResultProcessor<Lease>

@mgravell

Copy link
Copy Markdown
Collaborator

I can look tomorrow, but I assume it would be accessing the muxer via the connection to get the options, to pass into a new overload of AsLease

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.

2 participants