Skip to content

cmd/gopls/forward: use select instead of empty for#74

Closed
pwaller wants to merge 1 commit into
golang:masterfrom
pwaller:patch-1
Closed

cmd/gopls/forward: use select instead of empty for#74
pwaller wants to merge 1 commit into
golang:masterfrom
pwaller:patch-1

Conversation

@pwaller
Copy link
Copy Markdown

@pwaller pwaller commented Feb 11, 2019

An empty for loop body results in a CPU spinning at 100% CPU.

select {} is more friendly to battery life.

/cc @stamblerre

An empty for loop body results in a CPU spinning at 100% CPU.

`select {}` is more friendly to battery life.
@gopherbot
Copy link
Copy Markdown
Contributor

This PR (HEAD: 1baf584) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/tools/+/161837 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Copy Markdown
Contributor

Message from Ian Cottrell:

Patch Set 1: Code-Review-1

Hi,
There is nothing wrong with this change, but in
https://go-review.googlesource.com/c/tools/+/161658
I am totally removing this file, and integrating the functionality directly into gopls.
The new version does not use the busy loop.


Please don’t reply on this GitHub thread. Visit golang.org/cl/161837.
After addressing review feedback, remember to publish your drafts!

@pwaller pwaller closed this Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants