mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 07:25:56 +03:00
[GH-ISSUE #913] [BUG] Memory leaks caused by time.After #1469
Labels
No labels
CLI
bug
designing
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
idea
invalid
investigate
needs-more-info
performance
pr-welcome
pull-request
question
wontfix
work in progress
work in progress
work-around-available
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynq#1469
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @biningo on GitHub (Sep 3, 2024).
Original GitHub issue: https://github.com/hibiken/asynq/issues/913
Originally assigned to: @hibiken on GitHub.
Describe the bug
timer.After() creates a new timer object each time it is called. Which can cause a memory leak in the for loop.
github.com/hibiken/asynq@d04888e748/subscriber.go (L61-L74)github.com/hibiken/asynq@d04888e748/syncer.go (L60-L85)To Reproduce
Expected behavior
Creating the timer object before the for loop.
Screenshots
Environment (please complete the following information):
asynqpackage v0.24.1Additional context
@pior commented on GitHub (Nov 6, 2024):
No longer an issue on Go 1.23
https://github.com/hibiken/asynq/pull/914#issuecomment-2439589978