Skip to content
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

Use GOMAXPROCS instead of NumCPU #746

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eleboucher
Copy link

We can customize the number of CPU the application can use by setting gomaxprocs
therefore instead of using the max amount of cpu use the custom allowed max cpu count

We can customize the number of CPU the application can use by setting gomaxprocs
therefore instead of using the max amount of cpu use the custom allowed max cpu count
@ggodik
Copy link

ggodik commented Apr 4, 2022

We don't have a voting system here but I vote against this change

  1. This configuration should be explicitly set in applications - as it is currently passed into these functions. You can call StartConsuming("tag", runtime.GOMAXPROCS(0), ....) to achieve the same effect. This mechanism provides another path of configuration as a side effect - hence my downvote.
  2. godocs say this function will go away when scheduling improves https://pkg.go.dev/runtime#GOMAXPROCS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants