111-python-面向对象开启多线程
from threading import Thread
class Alls(Thread):
def __init__(self,age):
super().__init__()
self.age = age
def run(self):
print('ok')
print(self.age)
a = Alls(2)
a.run()
from threading import Thread
class Alls(Thread):
def __init__(self,age):
super().__init__()
self.age = age
def run(self):
print('ok')
print(self.age)
a = Alls(2)
a.run()