×

This is a C-level implementation of a fast, re-entrant, optimistic lock for CPython. It is a drop-in replacement for threading.RLock. FastRLock is implemented in Cython and also provides a C-API for direct use from Cython code via from fastrlock cimport rlock. Under normal conditions, it is about 10x faster than threading.RLock in Python 2.7 because it avoids all locking unless two or more threads try to acquire it at the same time. Under congestion, it is still about 10% faster than RLock due to being implemented in Cython. This is mostly equivalent to the revised RLock implementation in Python 3.2, but still faster due to being implemented in Cython. Note that the threading.RLock implementation in Python 3.4 and later tends to be as fast or even faster than the lock provided by this package, when called through the Python API. FastRLock is still faster also on these systems when called through its Cython API.

Uploaded Mon Mar 31 21:35:40 2025
md5 checksum a9e80b0a301de9d5258ffaf3e855cb90
arch x86_64
build py312h6a678d5_0
depends libgcc-ng >=11.2.0, libstdcxx-ng >=11.2.0, python >=3.12,<3.13.0a0
license MIT
license_family MIT
md5 a9e80b0a301de9d5258ffaf3e855cb90
name fastrlock
platform linux
sha1 107880356c6f0e171e5839cbf24f36089fb56805
sha256 81a9a277fcbe6327d29d8b91cfaffcdda2c2695d333dcfed7a1723ab9952b062
size 36101
subdir linux-64
timestamp 1698886100823
version 0.6