Skip to content

asyncio module state should be locked with mutexes in free-threaded builds #121621

Activity

  1. colesbury commented on Jul 11, 2024

    @colesbury
    Contributor

    I think we also want to make enter_task, leave_task, and swap_current_task behave atomically. For example, enter_task makes two dict API calls that individually lock the dictionary, but the combined operation isn't atomic.

    I can think of two strategies for this:

    1. Try to replace multiple API calls with a single call. For example, I think enter_task may be able to use PyDict_SetDefaultRef and leave_task may be able to use _PyDict_DelItemIf with some modifications.
    2. Use a critical section to lock the dict and use the "lock held" variants.
  2. added a commit that references this issue on Jul 14, 2024
  3. added a commit that references this issue on Jul 14, 2024
  4. added a commit that references this issue on Jul 15, 2024
  5. added a commit that references this issue on Jul 16, 2024
  6. added a commit that references this issue on Jul 16, 2024
  7. added a commit that references this issue on Jul 16, 2024
  8. added a commit that references this issue on Jul 17, 2024
  9. added a commit that references this issue on Jul 17, 2024
  10. added a commit that references this issue on Jul 17, 2024
  11. added a commit that references this issue on Jul 17, 2024
  12. added a commit that references this issue on Jul 18, 2024
  13. added 4 commits that reference this issue on Jul 19, 2024
  14. Fidget-Spinner commented on Jul 22, 2024

    @Fidget-Spinner
    MemberAuthor

    Fixed.

  15. added a commit that references this issue on Dec 18, 2024
  16. added a commit that references this issue on Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions