-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
gh-112529: Stop the world around gc.get_referents #114823
Conversation
We do not want to add locking in tp_traverse slot implementations. Instead, stop-the-world when calling gc.get_referents. Note that the the stop-the-world call is a no-op in the default build.
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
Left a small nit, feel free to ignore
PyObject *obj = PyTuple_GET_ITEM(args, i); | ||
|
||
if (!_PyObject_IS_GC(obj)) | ||
continue; |
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.
Small nit: Do you mind adding braces here to conform with PEP 7? (I know we are just moving code around but now that we are changing it it's a good opportunity)
Co-authored-by: Pablo Galindo Salgado <[email protected]>
We do not want to add locking in `tp_traverse` slot implementations. Instead, stop the world when calling `gc.get_referents`. Note that the the stop the world call is a no-op in the default build. Co-authored-by: Pablo Galindo Salgado <[email protected]>
We do not want to add locking in tp_traverse slot implementations. Instead, stop-the-world when calling gc.get_referents. Note that the the stop-the-world call is a no-op in the default build.
--disable-gil
builds #112529