资 源 简 介
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 continu