pip install fabricate python import fabricate python import fabricate import time class MyThread(fabricate.Thread): def run(self): for i in range(5): print(f'Thread {self.thread_id}: {i}') time.sleep(1) thread1 = MyThread() thread2 = MyThread() thread1.start() thread2.start() thread1.join() thread2.join() print('All threads completed')


上一篇:
下一篇:
切换中文