Registered by Adam Olsen

python-safethread is a large modification of CPython intended to provide safe, easy, and scalable concurrency mechanisms. It focuses on local concurrency, not distributed or parallel programs.

Note: As an implementation, python-safethread is dead. It is not worth the effort to continue rewriting CPython to have a true tracing GC.

However, the semantics presented are still viable and I intend to reuse them in future projects.

Some major features:

    * Exceptions from threads propagate naturally and cause the program to shut down gracefully.
    * No memory model is necessary. All mutable objects are safely contained with monitors (similar to Concurrent Pascal's monitors, but different from Java's monitors), or otherwise provide explicit semantics.
    * Deadlocks are detected and broken automatically.
    * Finalization is thread-safe (and uses a much simpler mechanism at a low-level.)
    * Most existing single-threaded code will continue to be correct (and in good style) when used amongst threads. Some boilerplate may be necessary to share module and class objects between threads.
    * The GIL is removed. Each additional thread should run at or near 100% throughput. However, the base (single-threaded) throughput is only around 60-65% that of normal CPython, so you'll need several threads for this to be worthwhile.

What little documentation there is exists at

Discussion may be done on the mailing list,, as well as in irc:// Or if you prefer, you may contact me directly at

Project information

Adam Olsen
Not yet selected
Apache Licence, Python Licence

RDF metadata

View full history Series and milestones

safethread-withoutgil series is the current focus of development.

All code Code

Version control system:

All bugs Latest bugs reported

Get Involved


Python-Safethread does not have any download files registered with Launchpad.