0
我使用spring來管理Glassfish中的線程,下面是我使用的代碼。出於某種原因,即使我已經設置線程池的最大數量爲10Glassfish V3線程數增加
final WorkManagerTaskExecutor taskExecutor = new WorkManagerTaskExecutor();
final QPRunable runable = new QPRunable(); => this class implements Runnable
taskExecutor.setWorkManagerName("Workmanager1");
taskExecutor.afterPropertiesSet();
taskExecutor.setBlockUntilCompleted(false);
taskExecutor.execute(runnable);
如何使池中重用線程,爲什麼線程數增加這麼多的任何建議都得到創建的線程100的。
在此先感謝。