-
Notifications
You must be signed in to change notification settings - Fork 18k
time: Ticker CPU behavior with for-range and for-select #41874
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
Comments
It would probably help if you could try with a recent release (Go1.15) and maybe tip too, as there has been some work on timers-related stuff recently. |
@huangong please upgrade to Go 1.15.2 and confirm if the problem still exists. Also, is it necessary to run a http server to demonstrate this issue? This program
consumes a low amount of CPU under Go 1.15.2
|
thanks for your reply, http server is not the must, just for simulating the closest environment to online service. |
@huangong using the program I supplied above, can you reproduce the problem? |
@davecheney seems fixed. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
The following code is a simplified version of the online service, after long time running(>a week), CaseOne will cause much more CPU usage than CaseTwo, (online service cpu problem be fixed after modifying to caseTwo);
What did you expect to see?
same behavior, normal cpu usage.
What did you see instead?
after long time running, CaseOne cause service much more CPU usage than CaseTwo. (500% CPU : 10% CPU in average)
The text was updated successfully, but these errors were encountered: