mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-06-09 06:15:19 +00:00
del[net]: remove unnecessary thread constructor parameters
This commit is contained in:
@@ -83,7 +83,7 @@ public abstract class EventBus {
|
||||
@Override
|
||||
public Thread newThread(Runnable runnable) {
|
||||
var threadName = StringUtils.format("event-p{}-t{}", poolNumber + 1, threadNumber.getAndIncrement());
|
||||
var thread = new FastThreadLocalThread(group, runnable, threadName, 0);
|
||||
var thread = new FastThreadLocalThread(group, runnable, threadName);
|
||||
thread.setDaemon(false);
|
||||
thread.setPriority(Thread.NORM_PRIORITY);
|
||||
thread.setUncaughtExceptionHandler((t, e) -> logger.error(t.toString(), e));
|
||||
|
||||
@@ -93,7 +93,7 @@ public class ZookeeperRegistry implements IRegistry {
|
||||
|
||||
@Override
|
||||
public Thread newThread(Runnable runnable) {
|
||||
Thread t = new FastThreadLocalThread(group, runnable, namePrefix + threadNumber.getAndIncrement(), 0);
|
||||
Thread t = new FastThreadLocalThread(group, runnable, namePrefix + threadNumber.getAndIncrement());
|
||||
t.setDaemon(false);
|
||||
t.setPriority(Thread.NORM_PRIORITY);
|
||||
t.setUncaughtExceptionHandler((thread, e) -> logger.error(thread.toString(), e));
|
||||
|
||||
@@ -79,7 +79,7 @@ public final class TaskBus {
|
||||
@Override
|
||||
public Thread newThread(Runnable runnable) {
|
||||
var threadName = StringUtils.format("task-p{}-t{}", poolNumber + 1, threadNumber.getAndIncrement());
|
||||
var thread = new FastThreadLocalThread(group, runnable, threadName, 0);
|
||||
var thread = new FastThreadLocalThread(group, runnable, threadName);
|
||||
thread.setDaemon(false);
|
||||
thread.setPriority(Thread.NORM_PRIORITY);
|
||||
thread.setUncaughtExceptionHandler((t, e) -> logger.error(t.toString(), e));
|
||||
|
||||
@@ -85,7 +85,7 @@ public abstract class SchedulerBus {
|
||||
@Override
|
||||
public Thread newThread(Runnable runnable) {
|
||||
var threadName = StringUtils.format("scheduler-p{}-t{}", poolNumber, threadNumber.getAndIncrement());
|
||||
var thread = new FastThreadLocalThread(group, runnable, threadName, 0);
|
||||
var thread = new FastThreadLocalThread(group, runnable, threadName);
|
||||
thread.setDaemon(false);
|
||||
thread.setPriority(Thread.NORM_PRIORITY);
|
||||
thread.setUncaughtExceptionHandler((t, e) -> logger.error(t.toString(), e));
|
||||
|
||||
Reference in New Issue
Block a user