tree-sitter/py-tree-sitter

Release Python GIL when possible

Aperta

#111 aperta il 23 mag 2022

 (10 commenti) (2 reazioni) (0 assegnatari)C (192 fork)github user discovery
help wanted

Metriche repository

Star
 (1488 stelle)
Metriche merge PR
 (Merge medio 4g 14h) (7 PR mergiate in 30 g)

Descrizione

I'm looking to search several million source files using the tree-sitter query interface. I'd love to use a thread pool in Python for this. Would it be possible to make a thread-safe Query.captures method that released the GIL?

I tried doing it in https://github.com/grantjenks/py-tree-sitter-languages but couldn't figure it out this evening (not sure it's possible with the current interface).

Guida contributor