mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-19 06:16:01 +00:00
perf[thread]: 优化当前线程的线程组
This commit is contained in:
1 parent
5c268e8dcf
commit
fed22442e7
5 files changed
+15
-8
No files matched your search
@@ -19,6 +19,7 @@ import com.zfoo.scheduler.SchedulerContext;
|
||||
import com.zfoo.scheduler.model.vo.SchedulerDefinition;
|
||||
import com.zfoo.scheduler.util.TimeUtils;
|
||||
import com.zfoo.util.SafeRunnable;
|
||||
import com.zfoo.util.ThreadUtils;
|
||||
import io.netty.util.concurrent.FastThreadLocalThread;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -77,8 +78,7 @@ public abstract class SchedulerBus {
|
||||
private final ThreadGroup group;
|
||||
|
||||
public SchedulerThreadFactory(int poolNumber) {
|
||||
var s = System.getSecurityManager();
|
||||
group = (s != null) ? s.getThreadGroup() : Thread.currentThread().getThreadGroup();
|
||||
this.group = ThreadUtils.currentThreadGroup();
|
||||
this.poolNumber = poolNumber;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user