Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(2.11) Internal: Small udpates to ipQueue #5940

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

kozlovic
Copy link
Member

Small updates to ipQueue:

  • Document that caller must not reuse the slice after call to recycle().
  • Reset size to 0 on pop() or last popOne() without need to call q.caclc().
  • Added missing recycle() calls in some places.
  • Added benchmarks to check perf impact on future changes.

Signed-off-by: Ivan Kozlovic [email protected]

Small updates to ipQueue:
- Document that caller must not reuse the slice after call to recycle().
- Reset size to 0 on pop() or last popOne() without need to call q.caclc().
- Added missing recycle() calls in some places.
- Added benchmarks to check perf impact on future changes.

Signed-off-by: Ivan Kozlovic <[email protected]>
@kozlovic kozlovic requested a review from a team as a code owner September 27, 2024 21:54
@kozlovic
Copy link
Member Author

@neilalexander As discussed in the other PR, I am splitting changes to ipQueue starting with this one, that contains small updates. I ended-up keeping []T for pop() (which also minimize changes) and simply document that one must not reuse the slice after recycle(), which, after thinking about it makes sense. Anything that is put back into a pool must not be reused by the caller, since the pool owns it now, and is then used by other code after a Get().

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