我建議使用Executors.newCachedThreadPool(),這將能夠解決產生過度線程時的問題。 但是,當線程數增長超過某個點時仍然存在錯誤。無論如何,在等待系統資源可用時允許線程自行等待? [WARN ] Thread table can't grow past 16383 threads.
[ERROR][thread ] Could not start thread pool
我有這個在實現可調用的類: public class MasterCrawler implements Callable {
public Object call() throws SQLException {
resumeCrawling();
return true;
}
//more code with methods that thro