Skip to content

Support free-thread build#725

Merged
TingDaoK merged 17 commits intomainfrom
support-ft
Mar 26, 2026
Merged

Support free-thread build#725
TingDaoK merged 17 commits intomainfrom
support-ft

Conversation

@TingDaoK
Copy link
Copy Markdown
Contributor

@TingDaoK TingDaoK commented Mar 24, 2026

Issue #, if available:

Description of changes:

  • https://docs.python.org/3/howto/free-threading-extensions.html
  • [PyList_GetItem](https://docs.python.org/3/c-api/list.html#c.PyList_GetItem) is not thread safe with free-threading, it should be fine in our code, since we just take the passed in list. But, it's just one time check and use, using strong ref should not add any overhead
  • Free-thread uncovers a race condition in aio/http.py, which we are not locking the queue from native thread vs the eventloop.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@TingDaoK TingDaoK enabled auto-merge (squash) March 26, 2026 21:10
@TingDaoK TingDaoK merged commit 9777213 into main Mar 26, 2026
77 checks passed
@TingDaoK TingDaoK deleted the support-ft branch March 26, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants