Skip to content

Conversation

ngoldbaum
Copy link

@ngoldbaum ngoldbaum commented Sep 12, 2025

This is to aid supporting the free-threaded build. Adding explicitly multithreaded tests like this exercises the behavior differences of the free-threaded build compared with the GIL-enabled build. See #1809 where I initially tried this with a different testing approach.

The content of the test is adapted from the asyn test_concurrency test.

I tried to make this use multiprocessing as well but ran into deadlocks so decided to stick to using 4 python threads in a thread pool.

c.f. huggingface/safetensors#637 where I added a multithreaded test to safetensors.

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.

1 participant