摘要: 1、队列代码示例 import threading import time from queue import Queue ''' Queue是线程安全的队列 ''' def set_data(q): index = 0 while True: q.put(index) index += 1 tim 阅读全文
posted @ 2020-01-03 13:50 高文祥888888 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 1、多线程使用案例 import time import threading def coding(): for x in range(0,3): print("正在写代码......") print(threading.current_thread()) time.sleep(1) def dra 阅读全文
posted @ 2020-01-03 11:18 高文祥888888 阅读(169) 评论(0) 推荐(0) 编辑