v0.6.112
Language binding concurrency fixes
This release corrects a 2026-05-05 review change (T5, #257) that released the
interpreter lock on the sync encrypt/decrypt hot path in the Ruby and
Python bindings. For warm-cache (sub-microsecond) operations the lock
release/reacquire dominates the work and collapses multi-threaded throughput.
-
Ruby (#330) — Remove
blocking: truefrom syncencrypt/decrypt
(restores the Cobhan-era behavior; ~4x multi-threaded throughput recovery).
Also dropsblocking: truefrom the async enqueue functions, which only
spawn onto the tokio runtime and never hold the GVL for I/O. Factory/config
init and the log/metrics hook set/clear functions keepblocking: true
(long/rare I/O and deadlock avoidance, respectively). -
Python (#331) — Remove
py.detach(GIL release) from sync
encrypt/decrypt. Benchmarked at ~3-4x faster at 4-8 threads with parity
single-threaded; the prior code showed negative thread scaling.
Callers needing concurrency across DB/KMS-bound cache misses should use the
async APIs (encrypt_async/decrypt_async in Ruby,
encrypt_bytes_async/decrypt_bytes_async in Python), which run on the tokio
runtime off the interpreter lock. Node was unaffected (its T5 change was
docs-only).