util.Executors.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of experiment-jvm-server Show documentation
Show all versions of experiment-jvm-server Show documentation
Amplitude Experiment server-side SDK for JVM (Java, Kotlin)
package com.amplitude.experiment.util
import java.util.concurrent.ThreadFactory
internal val daemonFactory: ThreadFactory = DaemonThreadFactory()
private class DaemonThreadFactory(
private val baseName: String = "experiment"
) : ThreadFactory {
private var count = 0
override fun newThread(r: Runnable): Thread {
val t = Thread(r, baseName + "-" + (++count))
t.isDaemon = true
return t
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy