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

线程问题

  •  
  •   ray1888 ·
    ray1888 · Aug 23, 2017 · 2146 views
    This topic created in 3273 days ago, the information mentioned may be changed or developed.

    想问一个问题,既然 threading 模块里面 join 的官方解释是: join([timeout]) Wait until the thread terminates. This blocks the calling thread until the thread whose join() method is called terminates – either normally or through an unhandled exception – or until the optional timeout occurs.

    When the timeout argument is present and not None, it should be a floating point number specifying a timeout for the operation in seconds (or fractions thereof). As join() always returns None, you must call isAlive() after join() to decide whether a timeout happened – if the thread is still alive, the join() call timed out.

    那它是怎样去对 threading 是否 termaine 进行判断吗?还是 python 通过信号量来进行判断的,求大神解释

    2 replies    2017-08-23 10:09:20 +08:00
    NoAnyLove
        1
    NoAnyLove  
       Aug 23, 2017
    你想要知道的答案全部在 threading.py 里面
    snnn
        2
    snnn  
       Aug 23, 2017 via Android
    最后这段中文我严重没看懂。请复述一下
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2862 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 08:38 · PVG 16:38 · LAX 01:38 · JFK 04:38
    ♥ Do have faith in what you're doing.