All Downloads are FREE. Search and download functionalities are using the official Maven repository.

util.Executors.kt Maven / Gradle / Ivy

There is a newer version: 1.6.1
Show newest version
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