摘要:
一、验证GIL的存在 from threading import Thread money = 100 def task(): global money money -= 1 t_list = [] for i in range(100): t = Thread(target=task) t.sta 阅读全文
摘要:
一、互斥锁 from multiprocessing import Process import time import json import random # 查票 def search(name): with open(r'data.json', 'r', encoding='utf8') a 阅读全文