一.守护进程 主进程创建守护进程 其一:守护进程会在主进程代码执行结束后就终止 其二:守护进程内无法再开启子进程,否则抛出异常:AssertionError: daemonic processes are not allowed to have children 注意:进程之间是互相独立的,主进程代码运行结束,守护进程随即终止 from multiprocessing import Process,Lock import time mutex=Lock() def task(name): pri
package reentrantlock; import java.util.ArrayList; public class ProviderAndConsumerTest { static ProviderAndConsumer providerAndConsumer = new ProviderAndConsumer(); public static void main(String[] args) throws InterruptedException { // new Thread(n