想问一个问题,既然 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 通过信号量来进行判断的,求大神解释
1
NoAnyLove 2017-08-23 09:30:03 +08:00
你想要知道的答案全部在 threading.py 里面
|
2
snnn 2017-08-23 10:09:20 +08:00 via Android
最后这段中文我严重没看懂。请复述一下
|