摘要:
消息队列-queue from threading import Thread from queue import Queue import random,time 储钱罐 def create(queue): for i in [100,50,20,10,5,1,0.5]: if not queu 阅读全文
摘要:
Event-信号传递 threading.Event源码的解释是这样的, class Event: """Class implementing event objects. Events manage a flag that can be set to true with the set() met 阅读全文
摘要:
multiprocessing.dummy.Pool import time from multiprocessing.dummy import Pool def run(fn): time.sleep(2) print(fn) if __name__=="__main__": testFL=[1, 阅读全文
摘要:
创建数据库 create database if not exists testDB default charset utf8 collate utf8_general_ci; 选择数据库 USE testDB; 建表 CREATE TABLE IF NOT EXISTS `test`( `id` 阅读全文