python多进程 pyinstaller打包后一直无限增加进程,但并不执行,导致死机
import multiprocessing from multiprocessing import Process,Lock,Manager from multiprocessing import Queue from multiprocessing import JoinableQueue #多进程程序用pyinstaller打包一味地增加进程,但不进行的解决方法 #解决思路:multiprocessing.freeze_support()必须写在主程序的第一行 if __name__=='__main__': multiprocessing.freeze_support() global con,connect multiprocessing.Process() connect = pymysql.connect(user = 'm', password = 'h', db = 'x', host = 'r', port = 3306, charset = 'utf8' ) con = connect.cursor() pw = Process(target=newlbjs, args=()) pr = Process(target=gxye, args=()) pr1 = Process(target=gxye, args=()) pr1.start() pw.start() pr.start() pw.join() pr.join() pr1.join() #newlbjs()