我需要并行运行程序,一次3个。我尝试了下面的方法,但是当programC在A和B之前完成时,它不起作用。我怎样才能限制正在运行的程序的数量,比如说,在任何时候最多3个。在
for i in range(10):
os.system("xterm -e program " + i + "a" + " &")
os.system("xterm -e program " + i + "b" + " &")
os.system("xterm -e program " + i + "c" + " ")
Tags:
这里是我的解决方案,不过我会选择一个更好的答案:
相关问题 更多 >
编程相关推荐