jjzjj

nlpAnalyzer

全部标签

java - 多个 newSingleThreadExecutor 与 ExecutorService 的 newFixedThreadPool

在我的应用程序中,我有4个不同的进程,它们永久运行,中间有一些小的停顿。当前版本的代码在单独的老式线程中执行每个进程:ThreadnlpAnalyzer=newThread(()->{//infinelopforautorestoreincaseofcrash//noinspectionInfiniteLoopStatementwhile(true){try{//thismethodshouldrunpermanently,pausesimplementedinternallyNLPAnalyzer.analyzeNLP(dbCollection);}catch(Exceptione)