+ private ExecutorWorker() {}
+
+ private final AtomicInteger counter = new AtomicInteger(0);
+ private final ThreadGroup threadGroup = new ThreadGroup("ExecutorWorker-Group");
+ private ScheduledThreadPoolExecutor pool = new ScheduledThreadPoolExecutor(1, r -> {
+ Thread t = new Thread(threadGroup, r, "ExecutorWorker-" + (counter.incrementAndGet()));
+ if (!t.isDaemon())
+ t.setDaemon(true);
+ if (t.getPriority() != Thread.NORM_PRIORITY)
+ t.setPriority(Thread.NORM_PRIORITY);
+ return t;
+ });
+