# 多线程举例 from threading import Thread from threading import current_thread class messager(Thread): def run(self): for x in range(20): print(current_thread().getName()) def print_num(self, n): for x in range(20): print(n) x_msg_obj = messager(name="发送消…