上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页
摘要: 阅读全文
posted @ 2018-09-11 22:30 sunzebo 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 代码: 输出: 基准,以上代码执行 main end 03:58 0->1 03:58 1->2 04:00 2->3 04:00 3->4 04:02 4->5 04:02 5->6 04:04 6->7 04:04 7->8 04:06 8->9 04:06 9->10 04:08 10->11 阅读全文
posted @ 2018-09-11 21:30 sunzebo 阅读(220) 评论(0) 推荐(0) 编辑
摘要: Out1 保证 在操作共享数据的地方,执行完线程1,再执行线程2 Out2 即使在线程1中加了锁,但是线程2没有加锁,两个代码在同时跑。 数据一致性无法保证 阅读全文
posted @ 2018-09-11 00:46 sunzebo 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 1 usePool.py 2 usePoolmap.py 3 usePoolgetData.py 4 usePoolCallback.py 使用回调函数 参考: python进程池:multiprocessing.pool 阅读全文
posted @ 2018-09-10 22:39 sunzebo 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 加工: https://www.cnblogs.com/jokerbj/p/7460260.html 首先需要明确的一点是GIL并不是Python的特性,它是在实现Python解析器(CPython)时所引入的一个概念。就好比C++是一套语言(语法)标准,但是可以用不同的编译器来编译成可执行代码。有 阅读全文
posted @ 2018-09-10 21:05 sunzebo 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 转自: https://www.cnblogs.com/jokerbj/p/7460260.html 个人理解: 守护线程 , 子线程守护主线程 1、子线程先运行完, 主线程继续跑 2、主线程先运行完, 如果所有子线程都是守护线程, 所有子线程 立即结束 Python thread.Thread 默 阅读全文
posted @ 2018-09-10 20:21 sunzebo 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 转自: https://www.jianshu.com/p/c655e0a944ae 阅读全文
posted @ 2018-09-10 19:55 sunzebo 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-09-09 04:26 sunzebo 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-09-09 04:14 sunzebo 阅读(496) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-09-09 03:08 sunzebo 阅读(332) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页