Java Executor永远不会启动

时间:2013-12-10 15:12:17

标签: java executorservice executor

我目前遇到的问题是我正在设置ExecutorService,但是对newFixedthreadPool的调用永远不会完成。我有一个记录器声明,它永远不会执行。

有什么东西导致它永远不会完成吗?以前从未发生过相同的代码,所以我很困惑。

ExecutorService ex = Executors.newFixedThreadPool(this.numStreams); 
logger.trace("Thread pool set up.");                                
for (int i = 1; i <= this.numStreams; i++)                          
{                                                                   
    logger.trace("Starting a new thread for stream {}", i);         
    Future f = ex.submit(new TestThread(c, c.getStreamIterator(i), this.config));
    logger.trace("New thread has been started.");                   
}

0 个答案:

没有答案