Skip to content

Commit bcdeb53

Browse files
committed
added thread group back
1 parent f80271d commit bcdeb53

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/com/password4j/Utils.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ class Utils
5353
private static final AtomicInteger THREAD_COUNTER = new AtomicInteger(1);
5454
private static final Pattern STRONG_PATTERN = Pattern.compile("\\s*([\\S&&[^:,]]*)(\\:([\\S&&[^,]]*))?\\s*(\\,(.*))?");
5555

56+
private static final ThreadGroup THREAD_GROUP = new ThreadGroup("Password4j Workers");
57+
5658
static
5759
{
5860
Arrays.fill(FROM_BASE64, -1);
@@ -621,7 +623,7 @@ static void printBanner(PrintStream printStream)
621623
String banner = "\n";
622624
banner += " |\n" +
623625
" | \033[0;1mPassword4j\033[0;0m\n" +
624-
" + \\ .: v1.8.1 :.\n" +
626+
" + \\ .: v1.8.2 :.\n" +
625627
" \\\\.G_.*=.\n" +
626628
" `(H'/.\\| ✅ Argon2\n" +
627629
" .>' (_--. ✅ scrypt\n" +
@@ -662,7 +664,7 @@ static List<byte[]> split(byte[] array, byte delimiter)
662664
static ExecutorService createExecutorService()
663665
{
664666
return Executors.newFixedThreadPool(AVAILABLE_PROCESSORS, runnable -> {
665-
Thread thread = new Thread(runnable, "password4j-worker-" + THREAD_COUNTER.getAndIncrement());
667+
Thread thread = new Thread(THREAD_GROUP, runnable, "password4j-worker-" + THREAD_COUNTER.getAndIncrement());
666668
thread.setDaemon(true);
667669
return thread;
668670
});

0 commit comments

Comments
 (0)