From 1a0fc19d1a054c1f4698f1d0cf9cef8bac40089a Mon Sep 17 00:00:00 2001 From: loy Date: Fri, 6 Aug 2021 16:22:09 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-48135=20=E4=BF=AE=E5=A4=8D=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E6=B1=A0=E8=B0=83=E7=94=A8=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/nx/app/designer/transform/BatchTransformer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/nx/app/designer/transform/BatchTransformer.java b/designer-base/src/main/java/com/fr/nx/app/designer/transform/BatchTransformer.java index 0f6a76f83..8dee1ca30 100644 --- a/designer-base/src/main/java/com/fr/nx/app/designer/transform/BatchTransformer.java +++ b/designer-base/src/main/java/com/fr/nx/app/designer/transform/BatchTransformer.java @@ -2,7 +2,6 @@ package com.fr.nx.app.designer.transform; import com.fr.design.utils.concurrent.ThreadFactoryBuilder; import com.fr.file.filetree.FileNode; -import com.fr.plugin.context.PluginContexts; import com.fr.nx.app.designer.toolbar.TransformResultInfo; import com.fr.nx.app.designer.utils.CompileTransformUtil; @@ -10,6 +9,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; /** * Created by kerry on 2019-12-10 @@ -21,7 +21,7 @@ public class BatchTransformer { private static final int MAXPOOLSIZE = 5; private static final String THREAD_NAME_TEMPLATE = "batchtransform-thread-%s"; private ExecutorService threadPoolExecutor = - PluginContexts.currentContext().newFixedThreadPool(MAXPOOLSIZE, + Executors.newFixedThreadPool(MAXPOOLSIZE, new ThreadFactoryBuilder().setNameFormat(THREAD_NAME_TEMPLATE).build()); public BatchTransformer(UpdateCallBack updateCallBack) { @@ -59,7 +59,7 @@ public class BatchTransformer { if (threadPoolExecutor != null) { threadPoolExecutor.shutdownNow(); } - threadPoolExecutor = PluginContexts.currentContext().newFixedThreadPool(MAXPOOLSIZE, + threadPoolExecutor = Executors.newFixedThreadPool(MAXPOOLSIZE, new ThreadFactoryBuilder().setNameFormat(THREAD_NAME_TEMPLATE).build()); updateCallBack.shutDown(); }