线程问题

2017-08-23 08:56:31 +08:00
 ray1888

想问一个问题,既然 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 通过信号量来进行判断的,求大神解释

1690 次点击
所在节点    Python
2 条回复
NoAnyLove
2017-08-23 09:30:03 +08:00
你想要知道的答案全部在 threading.py 里面
snnn
2017-08-23 10:09:20 +08:00
最后这段中文我严重没看懂。请复述一下

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/385059

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX