Skip to content

Upstream RefMutGuard / RefMutContainer to PyO3 #1890

@davidhewitt

Description

@davidhewitt

Hello, I'm interested in helping tokenizers ship free-threaded Python wheels (#1784). I plan to open one or more PRs in the near future to help move that forward.

I was studying the RefMutGuard pattern and think it's a very interesting solution for safely allowing access to &mut T within a Python callback. I would be interested in generalizing this to have a similar pattern for &T and releasing this upstream in PyO3.

I wanted to seek your permission here first - while I expect the code will not be a verbatim copy of your implementation, it would be nice to credit original design to you in the PyO3 source and also I can help update tokenizers to use PyO3's implementation once we've shipped it.

Please let me know what you think!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions