发布时间:2019-09-08 09:12:32编辑:auto阅读(2085)
近段时间发现一个 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
上一篇: python查看如何查看版本信息
下一篇: [python] 解决OSError:
51284
50736
41334
38144
32611
29514
28364
23233
23201
21526
1597°
2329°
1931°
1873°
2201°
1914°
2601°
4369°
4215°
2992°