Back to project page androidcodes.
The source code is released under:
GNU General Public License
If you think the Android project androidcodes listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.pract.threadpool; /*www .j a va2s . c om*/ public class TestThreadPoolManager { public static void main(String[] args) { ThreadPoolManager poolManager = new ThreadPoolManager(10); // now lets submit task poolManager.submitTask(new Runnable() { @Override public void run() { System.out.println("Starting Task A...."); try { Thread.sleep(5000); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("Task A Completed...."); } }); poolManager.submitTask(new Runnable() { @Override public void run() { System.out.println("Starting Task B...."); try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("Task B Completed...."); } }); } }