Free-threading

The extension holds no shared mutable state: inputs are immutable str objects, the lookup tables are read-only, and each turbohtml.Tokenizer owns its state machine, so tokenizers in different threads never contend. The extension declares free-threading support and a per-interpreter GIL on interpreters new enough to honor those slots, so it does not force the global lock back on under a free-threaded build. As with any stateful object, feeding one tokenizer from several threads at once needs synchronization on the caller’s side. See the free-threading extension guide.