From 5fc8a9a9f0b24a4e2eed43def5c6babab5f53d85 Mon Sep 17 00:00:00 2001 From: mxsm Date: Sat, 4 Feb 2023 08:39:46 +0800 Subject: [PATCH] [ISSUE #272]Fix NamedThreadFactory attribute typo --- .../storage/dledger/NamedThreadFactory.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dledger/src/main/java/io/openmessaging/storage/dledger/NamedThreadFactory.java b/dledger/src/main/java/io/openmessaging/storage/dledger/NamedThreadFactory.java index 143f0cab..36ea004a 100644 --- a/dledger/src/main/java/io/openmessaging/storage/dledger/NamedThreadFactory.java +++ b/dledger/src/main/java/io/openmessaging/storage/dledger/NamedThreadFactory.java @@ -25,16 +25,16 @@ public class NamedThreadFactory implements ThreadFactory { private final String threadNamePrefix; - private final boolean isDemoThread; + private final boolean isDaemonThread; - public NamedThreadFactory(final String threadNamePrefix, boolean isDemoThread) { - this(new AtomicInteger(0), threadNamePrefix, isDemoThread); + public NamedThreadFactory(final String threadNamePrefix, boolean isDaemonThread) { + this(new AtomicInteger(0), threadNamePrefix, isDaemonThread); } - public NamedThreadFactory(AtomicInteger threadIndex, final String threadNamePrefix, boolean isDemoThread) { + public NamedThreadFactory(AtomicInteger threadIndex, final String threadNamePrefix, boolean isDaemonThread) { this.threadIndex = threadIndex; this.threadNamePrefix = threadNamePrefix; - this.isDemoThread = isDemoThread; + this.isDaemonThread = isDaemonThread; } public NamedThreadFactory(final String threadNamePrefix) { @@ -56,7 +56,7 @@ public Thread newThread(Runnable r) { threadName.append("-").append(threadIndex.incrementAndGet()); } Thread thread = new Thread(r, threadName.toString()); - if (isDemoThread) { + if (isDaemonThread) { thread.setDaemon(true); } return thread;