推荐学习书目
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
erevus
V2EX  ›  Python

使用了 gevent 的 monkey.patch_all 之后,我新加的 socks 代理功能就不能用了...

  •  
  •   erevus · May 11, 2015 · 3663 views
    This topic created in 4039 days ago, the information mentioned may be changed or developed.

    gevent是前人留下的,如果要改成多线程什么的就得重写一次这个地方了
    大神们有没有优美的解决方法

    1 replies    2015-05-11 11:44:02 +08:00
    noli
        1
    noli  
       May 11, 2015
    不用多线程,用多进程 gevent.fork

    或者多线程也无所谓,把多线程之间的消息传递用 unix socket 来传递,这样 gevent 依然还是可以多线程扩展的。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1269 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 17:23 · PVG 01:23 · LAX 10:23 · JFK 13:23
    ♥ Do have faith in what you're doing.