| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Didn't we talk about making module globals automatically use deferred refcounts before, and wouldn't that fix the majority of the uses of enum?
Sorry, something went wrong.
| contention on objects that are shared between multiple threads. | ||
| [clinic start generated code]*/ |
There was a problem hiding this comment.
This could do with a little bit of an explanation what effect this'll have on the object lifetime.
Sorry, something went wrong.
| _cls_type = None | ||
|
|
||
| def __init__(self, fget=None, fset=None, fdel=None, doc=None): | ||
| sys._enable_deferred_refcount(self) |
There was a problem hiding this comment.
This probably deserves a specific comment on why this matters.
Sorry, something went wrong.
|
I think @nascheme already made that change. LOAD_ATTR and LOAD_GLOBAL enable deferred reference counting on the object if it's not owned by the current thread. Line 407 in 175ab31 It doesn't fix this issue because of how enum attributes are implemented. Maybe there's a way to extend that logic so that it covers the enum case? |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is a draft PR showing how we can improve enum scaling. It requires enabling deferred reference counting on objects from Python. That will probably be split out into a separate PR and issue.