lua-resty-timer
lua-resty-timer copied to clipboard
If 'timer' is collected, have any logs will be printed?
I have some trouble. Sometimes the timer will stop executing inexplicably, and it is difficult to reproduce. I think it may be collected. If 'timer' is collected, have any logs will be printed? What is the collection mechanism?
if you set the option detached to true it will always keep running and never be collected. If it is falsy (false or nil) then you must make sure you anchor the timer object such that it does not get garbage collected.
It does not add a log statement when it gets collected, that should be a nice addition, a debug-level message.