Does python have compare and swap operations

亡梦爱人 提交于 2019-12-23 09:28:04

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!