python是否有比较和交换操作 [英] Does python have compare and swap operations

查看:69
本文介绍了python是否有比较和交换操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试查找python是否支持CAS操作,无锁编程,并发性,如Java中一样?

Trying to find if the python support CAS operations, lock free programming, concurrency like in java?

推荐答案

Python不支持有那些操作。 Java具有比Python更复杂的并发控制。

Python does not have those operations. Java has more sophisticated concurrency controls than Python does.

CPython(几乎每个人都使用的典型实现)具有一个全局解释器锁,您需要了解它。

CPython (the typical implementation almost everyone uses) has a Global Interpreter Lock that you will want to understand.

Jython是JVM上的Python实现,因此具有Java的许多并发特性。

Jython is a Python implementation on the JVM, and so shares many of the concurrency characteristics of Java.

这篇关于python是否有比较和交换操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆