python - Python 初始化线程的最佳方法是什么?
问题描述
我找到了两种不同的方法来初始化线程。
我想知道什么是最好的:
class Class_name(Thread):
"""docstring for the class"""
def __init__(self):
super(Class_name, self).__init__()
或者
class Class_name(Thread):
"""docstring for the class"""
def __init__(self):
Thread.__init__(self)
如果有人知道哪个是最好的以及它有什么不同,那将有助于我选择。
解决方案
推荐阅读
- phpmyadmin - 如何连接/允许从 localhost:4200 访问由 xampp 托管的 phpmyadmin?
- c# - 如何在 c# 上使用异步连接通过套接字发送多条消息
- react-native - 数组计数中的 this.state.someThing
- java - 为按钮分配字符串值 - JavaFx
- php - cURL 可以通过命令行正常连接,但不能在 PHP 中连接的原因?
- .net-core - 带有配置文件的 Dot Net Core 中的 IoC/DI
- c - 在 C 中使用 unsigned int 有什么意义?
- android - 单击按钮移动到下一个 EditText
- javascript - 如何在字符串中获取@之前和之后的所有内容
- android - 'let' 在 livedata observable Kotlin 的 lambda 表达式中是什么意思