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

Simplify detection of re-entrant initialization of pyclass types #2950

Closed
davidhewitt opened this issue Feb 13, 2023 · 1 comment
Closed

Comments

@davidhewitt
Copy link
Member

          The detection of re-entrant initialization seem surprisingly heavy weight. What do you think about turning this around in the future, meaning to use e.g. a thread-local list of type object addresses which the current thread is currently initializing instead of a list of threads for each type object?

Originally posted by @adamreichold in #2947 (comment)

@adamreichold
Copy link
Member

This does not work as reentrancy can happen both from the current thread which could be detected using a thread-local list and from other threads at the same time, so we still need global synchronization. I guess, this could be done using hazard pointers but that seems a bit too much to reduce start-up time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants