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

gh-114271: Make thread._rlock thread-safe in free-threaded builds #115102

Merged
merged 1 commit into from
Feb 16, 2024

Commits on Feb 6, 2024

  1. Make thread._rlock thread-safe in free-threaded builds

    The ID of the owning thread (`rlock_owner`)  may be accessed by
    multiple threads without holding the underlying lock; relaxed
    atomics are used in place of the previous loads/stores.
    
    The number of times that the lock has been acquired (`rlock_count`)
    is only ever accessed by the thread that holds the lock; we do not
    need to use atomics to access it.
    
    The embedded lock (`rlock_lock`) is already thread-safe.
    mpage committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    f298d45 View commit details
    Browse the repository at this point in the history