Changed default thread priority to normal

This commit is contained in:
Robinson 2022-07-26 13:07:20 +02:00
parent 155e432ed9
commit f7c8731d94
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
1 changed files with 3 additions and 3 deletions

View File

@ -29,15 +29,15 @@ class NamedThreadFactory constructor(
val group: ThreadGroup = Thread.currentThread().threadGroup,
/** @param threadPriority 1-10, with 5 being normal and 10 being max */
val threadPriority: Int = Thread.MAX_PRIORITY,
val threadPriority: Int = Thread.NORM_PRIORITY,
/** @param daemon true to stop this thread automatically when the JVM shutsdown */
val daemon: Boolean = true
) : ThreadFactory {
constructor(poolNamePrefix: String, group: ThreadGroup) : this(poolNamePrefix, group, Thread.MAX_PRIORITY, true)
constructor(poolNamePrefix: String, group: ThreadGroup) : this(poolNamePrefix, group, Thread.NORM_PRIORITY, true)
constructor(poolNamePrefix: String, isDaemon: Boolean) : this(poolNamePrefix, Thread.currentThread().threadGroup, isDaemon)
constructor(poolNamePrefix: String, group: ThreadGroup, isDaemon: Boolean) : this(poolNamePrefix, group, Thread.MAX_PRIORITY, isDaemon)
constructor(poolNamePrefix: String, group: ThreadGroup, isDaemon: Boolean) : this(poolNamePrefix, group, Thread.NORM_PRIORITY, isDaemon)
private val poolId = AtomicInteger()