multithreading - How can i create Internal Thread pool for a single Thread in java -


i have quartz job reading queue , writing queue. reading done in main thread , writing done in sub thread.

how can create pool , sub thread pool

you can use java executor framework.

example:

threadpoolexecutor executor = (threadpoolexecutor) executors.newcachedthreadpool();  

Comments