- 
                Notifications
    
You must be signed in to change notification settings  - Fork 893
 
          default to gil_used = false
          #5564
        
          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
Conversation
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.
Super minor nits but otherwise looks great.
| A module can opt-out of supporting free-threaded Python until it has audited its `unsafe` code for correctness by declaring the module with `#[pymodule(gil_used = true)]` (see below). | ||
| 
               | 
          ||
| More complicated `#[pyclass]` types may need to deal with thread-safety directly; there is [a dedicated section of the guide](./class/thread-safety.md) to discuss this. | ||
| Complicated `#[pyclass]` types may need to deal with thread-safety directly; there is [a dedicated section of the guide](./class/thread-safety.md) to discuss this. | 
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.
Want me to go over these docs once more to see if they still make sense with the new default?
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.
Keeping docs fresh is always much appreciated! I think I got everything but will never say no to another pair of eyes 😄
Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
Related to #5525 which has switched the default
gil_usedflag tofalseas part of that diff, also default modules created withPyModule::newto not require the GIL. This PR also takes the opportunity to add documentation to the migration guide.