#!/usr/src/python# -*- coding:utf-8 -*- # from multiprocessing import Process# import time### def process_test(name):# print(‘%s is testing‘%name)# time.sleep(2)# print(‘%s test end‘%name)### if __name__ == ‘__main__‘:# p1 = Process(target=process_test, args=(‘larry‘,))# p2 = Process(target=process_test, args=(‘linzhengjun‘,))# p3 = Process(target=process_test, args=(‘linzj‘,))# p4 = Process(target=process_test, args=(‘lzj‘,))## p1.start()# p2.start()# p3.start()# p4.start()# print(‘master thread‘)
时间: 2024-12-20 01:27:35