简体   繁体   English

在Python3中,`urllib.request`线程安全吗?

[英]In Python3, is `urllib.request` thread-safe?

It's not found if urllib.request is thread-safe or not in Pyhton 3 document . 如果urllib.request在Pyhton 3 文档中是否是线程安全的,则无法找到。 Is there anything special that I have to look for when using it in multi-threading scripts? 在多线程脚本中使用它时,我需要寻找什么特别的东西吗?

According to urllib.request 's source here , here and here , no, it isn't. urllib.request的源在这里这里这里 ,不,它不是。

In general, Python is not thread safe, so unless explicitly stated that a module is, you should assume it isn't. 一般来说,Python 不是线程安全的,所以除非明确声明一个模块,否则你应该假设它不是。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM