3 pointsby dpdani6 hours ago1 comment
  • dpdani6 hours ago
    Hello

    I’ve been working on cereggii, a library for multithreading utilities for Python. It started a couple of years ago for my master’s thesis, and I think it’s gotten into a place now where I believe it can be generally useful to the community.

    It contains several thread synchronization utilities and atomic data structures which are not present in the standard library (e.g. AtomicDict, AtomicInt64, AtomicRef, ThreadSet), so I thought it would be good to try and fill that gap. The main goal is to make concurrent shared-state patterns less error-prone and easier to express in Python.

    The library fully supports both free-threading and GIL-enabled builds (also see https://py-free-threading.github.io/). I believe it can also be useful for existing multithreaded code.

    I’d really appreciate feedback from folks who do multithreading/concurrency in Python:

    - Is the API intuitive? - Are there missing primitives you’d want? - Any concerns around ergonomics/docs/performance expectations?

    I’m hoping to grow the library via community feedback, so if you have any, please share!

    Repo: https://github.com/dpdani/cereggii

    Docs: https://dpdani.github.io/cereggii/