问题
Trying to find if the python support CAS operations, lock free programming, concurrency like in java?
回答1:
Python does not have those operations. Java has more sophisticated concurrency controls than Python does.
CPython (the typical implementation almost everyone uses) has a Global Interpreter Lock that you will want to understand.
Jython is a Python implementation on the JVM, and so shares many of the concurrency characteristics of Java.
来源:https://stackoverflow.com/questions/25219326/does-python-have-compare-and-swap-operations