我在tomcat 7上运行了一个web应用程序(带有Spring/Spring ),其中定义了一些ExecutorService,如: TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(1000), new ThreadPoolExecutor.Call
我有一个X线程列表(可能超过100个),我希望同时运行不超过5个线程。finish then launch the 5 other and so on.但问题是,等待这5个线程完成,我可以在其中一个线程完成后立即启动另一个线程。是否有类似于java中的事件/侦听器的方法来在线程完成时引发某种标志?
谢谢