随笔分类 -  Python

Python+sqlite:一个简单的数据库连接池
摘要:1 import sqlite3 2 import os 3 from threading import Lock, BoundedSemaphore 4 5 6 class ConnPool: 7 8 def __init__(self, db_name, max_conn): 9 self.__ 阅读全文

posted @ 2020-08-17 15:05 旭、 阅读(1821) 评论(1) 推荐(0)

Python:使用threading实现一个简单线程池
摘要:1 from threading import Lock, Semaphore, Thread 2 from sqlite_conn_pool.connection_pool import ConnPool, ConnPoolRAII 3 4 5 class ThreadPool: 6 def __ 阅读全文

posted @ 2020-08-17 15:01 旭、 阅读(830) 评论(0) 推荐(0)

导航