多线程
流浪的python
QQ群:796245415
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
基础认识多线程并发,资源抢占,资源加锁
前尘篇:pt1首先不加锁看看资源会怎么样# coding=utf-8import threadingimport timek =1def walk(n): global k k = k+n k= k-n print "我是悟空||菩萨在此"def run(n): for j i...原创 2018-11-25 23:11:47 · 1718 阅读 · 4 评论 -
多线程并发玩具
# coding=utf-8import threadingimport time mutex = threading.Lock()class TestTreading(threading.Thread): def __init__(self,id): threading.Thread.__init__(self) self.id =id...原创 2018-12-27 23:46:09 · 196 阅读 · 0 评论
分享