摘要: 运行结果 注意最好在控制台下面跑 阅读全文
posted @ 2018-05-27 18:07 Lucky& 阅读(2820) 评论(0) 推荐(0) 编辑
摘要: 推荐资料 https://www.cnblogs.com/xiaokang01/p/9865724.html socket传输文件 服务端 客户端 进度条 socket_server 传输文件 #!/usr/bin/env python # -*- coding: utf-8 -*- # @Time 阅读全文
posted @ 2018-05-27 17:52 Lucky& 阅读(22089) 评论(1) 推荐(0) 编辑
摘要: #利用同步对象也可以 event = threading.Event() def Produce(name): count = 0 # conut表示做的包子总个数 while count < 10: print('厨师%s在做包子中...'%name) time.sleep(2) q.put(co 阅读全文
posted @ 2018-05-27 16:45 Lucky& 阅读(11314) 评论(0) 推荐(1) 编辑
摘要: python的GIL In CPython, the global interpreter lock, or GIL, is a mutex that prevents multiple native threads from executing Python bytecodes at once. 阅读全文
posted @ 2018-05-27 16:33 Lucky& 阅读(1890) 评论(0) 推荐(1) 编辑
摘要: 什么是多道处理机制 加入abc三个依次执行,但是a阻塞了,就直接不执行a了,直接跳过去执行b,和c,最后在执行a 多道程序设计, 提高了cpu的利用率 进程与线程 进程:本质上就是一个一段程序的运行过程(抽象的概念) 线程:最小的执行单元(实例) 进程:最小的资源单位(操作系统在分资源时,只能分到进 阅读全文
posted @ 2018-05-27 14:47 Lucky& 阅读(180) 评论(0) 推荐(0) 编辑
//返回顶部开始
//返回顶部结束