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

feature: set GOMAXPROCS env var during Set #58

Closed
wants to merge 1 commit into from

Conversation

xieyuschen
Copy link

Currently, when do import _ "go.uber.org/automaxprocs", the GOMAXPROCS is set automatically for users.
But it doesn't set up the GOMAXPROCS environment variable which means if the programs exec some children processes to do some work, the env var needs to be set up manually.

For me, I think there are no side effects to setup the GOMAXPROCS environment variable also when we set up it in the program. So I raised this PR.

Regrads.

@CLAassistant
Copy link

CLAassistant commented Nov 11, 2022

CLA assistant check
All committers have signed the CLA.

@xieyuschen
Copy link
Author

Hi @akshayjshah , could you kindly check this PR if you are free?
Regards

@akshayjshah
Copy link
Contributor

akshayjshah commented Mar 16, 2023 via email

@xieyuschen
Copy link
Author

I see, thanks for replying, @akshayjshah

Hi @albertyw @abhinav , could you kindly check it if you have time?

Thanks:)

@albertyw
Copy link
Member

I don't think we can merge this. This feature request is essentially the same as the discussion in #29 to expose core count except through an environment variable instead of as part of the library API. See #29 (comment) for more reasoning.

For your use case of setting GOMAXPROCS on children processes, I suggest having your children processes import this library themselves.

@xieyuschen xieyuschen closed this Nov 21, 2023
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.

4 participants