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

[ipfs/go-bitswap] Avoid using time.After #122

Closed
Stebalien opened this issue Jan 6, 2020 · 0 comments · Fixed by #687
Closed

[ipfs/go-bitswap] Avoid using time.After #122

Stebalien opened this issue Jan 6, 2020 · 0 comments · Fixed by #687

Comments

@Stebalien
Copy link
Member

It doesn't cleanup the timer until it fires, even if we ignore the result.

https://github.com/ipfs/go-bitswap/blob/84f8ab6cd0375229d06dc484667b9ed04a67b259/messagequeue/messagequeue.go#L231-L233

@Jorropo Jorropo transferred this issue from ipfs/go-bitswap Jan 27, 2023
@Jorropo Jorropo changed the title Avoid using time.After [ipfs/go-bitswap] Avoid using time.After Jan 27, 2023
gammazero added a commit that referenced this issue Oct 9, 2024
Reusing a timer repeatedly results in less GC than time.After in each loop iteration.

Closes #122
@lidel lidel closed this as completed in 7bf89a7 Oct 11, 2024
gammazero added a commit that referenced this issue Oct 22, 2024
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 a pull request may close this issue.

1 participant