main.kotlin.com.intuit.playerui.utils.test.ThreadUtils.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testutils Show documentation
Show all versions of testutils Show documentation
A cross-platform semantic rendering engine
The newest version!
package com.intuit.playerui.utils.test
public interface ThreadUtils {
public val exceptions: MutableList
public val threads: MutableList
public fun addThreads(vararg threads: Thread) {
threads.forEach {
it.setUncaughtExceptionHandler { _, e -> exceptions.add(e); throw e }
this.threads.add(it)
}
}
public fun startThreads() {
threads.forEach {
if (it.state == Thread.State.NEW) it.start()
}
}
public fun verifyThreads() {
threads.forEach { it.join(10000) }
exceptions.forEach { throw it }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy