我想找到位集中第一个设置位的索引。大多数现代 CPU 都可以利用 FFS 指令来加速正常大小的数字类型。当我想查找 C++ std::bitset 中的第一个设置位时,可以使用此指令吗?
所以我找到了这段代码:
from threading import Thread
class Example(Thread):
def __init__(self):
Thread.__init__(self)
def run (self):
print("It's working!")
Example().start()
Run Code Online (Sandbox Code Playgroud)
并显示“正在运行!” 使用另一个线程,但这如何工作?我在类中找不到有关Thread .__ init __(self)的任何信息。它和超类有关吗?