Commit fda1fbc
feat(hooks): declare native extension free-thread safe (#120)
Declare the dist_instrument_hooks module as supporting the free-threaded
build by calling PyUnstable_Module_SetGIL(Py_MOD_GIL_NOT_USED) under
Py_GIL_DISABLED. Without this, importing the extension on a free-threaded
interpreter re-enables the GIL and emits a RuntimeWarning. The underlying
instrument-hooks C library uses its own internal locking, so the module
is safe to run without the GIL.
Co-authored-by: Claude <noreply@anthropic.com>1 parent f3ed388 commit fda1fbc
1 file changed
Lines changed: 4 additions & 0 deletions
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
300 | 304 | | |
301 | 305 | | |
0 commit comments