tree-sitter/py-tree-sitter

Release Python GIL when possible

开放

#111 创建于 2022年5月23日

 (10 条评论) (2 个反应) (0 位负责人)C (193 个派生)github user discovery
help wanted

仓库指标

星标
 (1,488 个星标)
PR 合并指标
 (平均合并 4天 14小时) (30 天内合并 7 个 PR)

描述

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).

贡献者指南