Re-hi, I updated my fork of CPython 3.x to include a very similar functionality, _thread.atomic_enter() and _thread.atomic_exit(). (Of course without any multicore capabilities, but it gives you the atomicity.) A very small diff overall. http://bitbucket.org/arigo/cpython-withatomic A bientôt, Armin.