I'm new to java executor stuff.
I'm using Java's ExecutorService to launch several threads to process data.
Executor executor = Executors.newFixedThreadPool(poolSize);
for(int i=0; i< 5;i++) executor.execute(new MyRunnable(i));
once the threads don't find data, they gracefully terminate.
My question is what happens to the Executor when all the threads terminate, is it still running its master thread ? or it will terminate itself and whole application will finish gracefully?
in case executor thread still runs, how can I let it terminate once all its child threads are done (poolSize number of threads).