Skip to content

Commit 0c88f26

Browse files
committed
Add free-threading support for Python 3.13+
Implements thread-safe concurrent database operations for Python's free-threading mode using native locks where available. - Uses native RW locks (pthread_rwlock_t on POSIX, SRWLOCK on Windows) to allow multiple concurrent readers - Uses GIL on platforms that don't support these native locks - Zero overhead when GIL is enabled (macros compile to no-ops)
1 parent 178bf54 commit 0c88f26

File tree

2 files changed

+278
-8
lines changed

2 files changed

+278
-8
lines changed

HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ History
99
* Databases can now be loaded from buffers. This can be done by passing in a
1010
buffer as the database and using mode ``MODE_FD``. Pull request by Emanuel
1111
Seemann. GitHub #234.
12+
* The C extension now supports Python 3.13+ free-threading mode and is
13+
thread-safe for concurrent reads on platforms with pthread support (such as
14+
Linux and macOS) and Windows. On other platforms, the extension will use
15+
GIL-based protection.
1216

1317
2.8.2 (2025-07-25)
1418
++++++++++++++++++

0 commit comments

Comments
 (0)