Python 内置类型 dict, list,线程安全吗?
2018-03-29 12:40
417 查看
近段时间发现一个 Python 连接数据库的连接是线程不安全的,结果惹得我哪哪儿都怀疑变量的多线程是否安全的问题,今天终于找到了正确答案,那就是 Python 内置类型 dict,list ,tuple 是线程安全的。
请参考官方解释: http://docs.python.org/glossary.html#term-global-interpreter-lock
还有另一篇文章课参考: http://effbot.org/pyfaq/what-kinds-of-global-value-mutation-are-thread-safe.htm
请参考官方解释: http://docs.python.org/glossary.html#term-global-interpreter-lock
还有另一篇文章课参考: http://effbot.org/pyfaq/what-kinds-of-global-value-mutation-are-thread-safe.htm
相关文章推荐
- Python中内置数据类型list,tuple,dict,set的区别和用法
- Python中内置数据类型list,tuple,dict,set的区别和用法
- Python中内置数据类型list,tuple,dict,set的区别和用法
- Python中内置数据类型list,tuple,dict,set的区别和用法
- python内置数据类型:list,tuple,dict比较
- Python中内置数据类型list,tuple,dict,set的区别和用法
- PYTHON内置数据类型( list ,tuple ,dict,set)
- python——内置类型——list tuple dict set
- Python中内置数据类型list,tuple,dict,set的区别和用法
- Python教程学习简记1--Python数据类型和变量 字符串和编码 list和tuple 条件判断 循环 dict和set
- python---数据结构与数据类型,list,dict,tuple,排序sort,比较cmp,字符串模版
- python的list和dict是否是线程安全的讨论
- Python内置的数据类型--list,tuple
- python教程19--《python基本数据类型list、tuple、dict、linecache读取file内容大综合运用》
- Python3学习(一)-基础、数据类型、变量、字符串和编码、list&tuple、if、for、while、dict、set、函数与参数
- Python(可变/不可变类型,list,tuple,dict,set)
- Python【基础:数据类型和变量 字符串和编码 list和tuple 条件判断 循环 dict和set】注意事项(与java,c比较)
- Python中的list/tuple/dict/set数据类型详解(转载)
- Python基础语法之内置的数据类型list和tuple
- Python内置类型——list