from concurrent.futures import ThreadPoolExecutorwith ThreadPoolExecutor(max_workers=processes_num) as thread: thread.submit(func, x,y,z) threading.Thread(target=action,args=(xxx,)).start()