多线程类(python)

2024-09-27 07:27:40 发布

您现在位置:Python中文网/ 问答频道 /正文

如果我有一门课穿线。穿线我使用.start()

class hello(threading.Thread):
    def run():
        print "hi"
        print "bye"

所以这是一个线程,但是当我想要在一个类中包含两个线程函数时?我该怎么做?你知道吗

因为使用.start()时,它在新线程中使用run函数。你知道吗


Tags: 函数runhellodefhi线程threadstart

热门问题