-
Notifications
You must be signed in to change notification settings - Fork 20.4k
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
common/fdlimit: Move fdlimit files to separate package #15850
common/fdlimit: Move fdlimit files to separate package #15850
Conversation
When go-ethereum is used as a library the calling program need to set the FD limit. This commit extract fdlimit files to a separate package so it can be used outside of go-ethereum.
common/fdlimit/fdlimit_windows.go
Outdated
// to the maximum hard-limit allowed by the OS. | ||
func raiseFdLimit(max uint64) error { | ||
func RaiseFdLimit(max uint64) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename the functions so FdLimit
doesn't appear in the name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fjl thanks for the feedback. I tried to find better names than Raise
, Get
and GetMax
but couldn't come up with something better.
Any suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ricardohsd You could use Current
and Maximum
. Then you would have:
fdlimit.Raise
, fdlimit.Current
and fdlimit.Maximum
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@karalabe thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Will merge if CI's green
* common/fdlimit: Move fdlimit files to separate package When go-ethereum is used as a library the calling program need to set the FD limit. This commit extract fdlimit files to a separate package so it can be used outside of go-ethereum. * common/fdlimit: Remove FdLimit from functions signature * common/fdlimit: Rename fdlimit functions
When
go-ethereum
is used as a library the calling program need to set the FD limit.This commit extract fdlimit files to a separate package so it can be used outside of
go-ethereum
.#15833