Closed biningo closed 2 weeks ago
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. https://github.com/hibiken/asynq/blob/d04888e74845fc7434c6a50755e62ec6ffda5911/subscriber.go#L61-L74 https://github.com/hibiken/asynq/blob/d04888e74845fc7434c6a50755e62ec6ffda5911/syncer.go#L60-L85 To Reproduce
Expected behavior Creating the timer object before the for loop.
Screenshots
Environment (please complete the following information):
asynq
Additional context
No longer an issue on Go 1.23
https://github.com/hibiken/asynq/pull/914#issuecomment-2439589978
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. https://github.com/hibiken/asynq/blob/d04888e74845fc7434c6a50755e62ec6ffda5911/subscriber.go#L61-L74 https://github.com/hibiken/asynq/blob/d04888e74845fc7434c6a50755e62ec6ffda5911/syncer.go#L60-L85 To Reproduce
Expected behavior Creating the timer object before the for loop.
Screenshots
Environment (please complete the following information):
asynq
package v0.24.1Additional context