推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
abersheeran
V2EX  ›  Python

写了一个基于 Python PEP249 的连接池

  •  
  •   abersheeran · Jan 15, 2021 · 2250 views
    This topic created in 1944 days ago, the information mentioned may be changed or developed.

    https://github.com/abersheeran/pep249

    昨儿一顿搜索没搜到,自己写了一个用。

    • 取、还操作均线程安全
    • 可限制最大连接数
    • 仅在需要时初始化连接

    别问,问就是摸鱼了几个小时,写了几十分钟搞定。一天工作量又有了。

    1 replies    2021-01-16 23:24:12 +08:00
    tmackan
        1
    tmackan  
       Jan 16, 2021
    evenlet 这个库的 db_pool.py 文件有一个实现可以参考下
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   944 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 21:14 · PVG 05:14 · LAX 14:14 · JFK 17:14
    ♥ Do have faith in what you're doing.