-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Move gc and gc_enable to their own module #25616
Conversation
Just unexport them? Seems silly to have a whole module just for this... |
I agree just unexporting them is fine. But if we want the module, I prefer the name |
Okay, then would you prefer no module or a module named GC? I'm pretty indifferent. |
I think calling it |
I'd prefer |
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.
I agree that these don't need to be in a module, then can just exist in Base. I'm not sure they really need to be unexported either. I would just update the docs to sound more informative and less scary.
base/gcutils.jl
Outdated
Perform garbage collection. | ||
|
||
!!! warning | ||
This should not generally be used. |
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.
I think this is too strong. We probably should have just said "Excessive use will likely lead to poor performance". Being "not used often" (appropriate wording) and "should not generally be used" (current wording) don't quite express the same level of concern.
base/gcutils.jl
Outdated
`false` for disabled). Return previous GC state. | ||
|
||
!!! warning | ||
Disabling garbage collection should be used only with extreme caution, as it can cause |
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.
delete "extreme"
95f8175
to
2d7d006
Compare
Documentation updated. This now puts |
2d7d006
to
f3fb539
Compare
b59970e
to
aae96d0
Compare
Good to go when it passes. |
I'm having a hard time coming up with an appropriate deprecation for |
I would suggest that people not write |
Fair enough. |
Should we consider moving |
aae96d0
to
9d0be35
Compare
We document that these functions should not generally be used, and yet they're exported from Base. This moves the two functions into their own submodule, Base.GC, and deprecates the exported functions.
9d0be35
to
bdc9094
Compare
Would be good to have Compat support for these. |
We have since JuliaLang/Compat.jl#477, except for |
|
Possibly |
We document that these functions should not generally be used, and yet they're exported from Base. This PR moves the two functions into their own submodule, Base.GC. It seems a little silly to me that we say, "Here are these functions in your namespace, but you really shouldn't call them." Apparently they've been exported since Julia 0.1, so I imagine it's sort of a historical artifact at this point.