diff --git a/libraries/stdlib/src/kotlin/concurrent/Thread.kt b/libraries/stdlib/src/kotlin/concurrent/Thread.kt index a1062277dc8..927dc3815a2 100644 --- a/libraries/stdlib/src/kotlin/concurrent/Thread.kt +++ b/libraries/stdlib/src/kotlin/concurrent/Thread.kt @@ -12,54 +12,6 @@ import java.util.concurrent.Future public val currentThread: Thread get() = Thread.currentThread() -/** - * Exposes the name of this thread as a property. - */ -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("name"), level = DeprecationLevel.HIDDEN) -public var Thread.name: String - get() = getName() - set(value) { - setName(value) - } - -/** - * Exposes the daemon flag of this thread as a property. - * The Java Virtual Machine exits when the only threads running are all daemon threads. - */ -@Deprecated("Use synthetic extension property isDaemon instead.", ReplaceWith("this.isDaemon")) -public var Thread.daemon: Boolean - get() = isDaemon() - set(value) { - setDaemon(value) - } - -/** - * Exposes the alive state of this thread as a property. - */ -@Deprecated("Use synthetic extension property isAlive instead.", ReplaceWith("this.isAlive")) -public val Thread.alive: Boolean - get() = isAlive() - -/** - * Exposes the priority of this thread as a property. - */ -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("priority"), level = DeprecationLevel.HIDDEN) -public var Thread.priority: Int - get() = getPriority() - set(value) { - setPriority(value) - } - -/** - * Exposes the context class loader of this thread as a property. - */ -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("contextClassLoader"), level = DeprecationLevel.HIDDEN) -public var Thread.contextClassLoader: ClassLoader? - get() = getContextClassLoader() - set(value) { - setContextClassLoader(value) - } - /** * Creates a thread that runs the specified [block] of code. * @@ -104,21 +56,3 @@ public inline fun ThreadLocal.getOrSet(default: () -> T): T { // TODO: replace let with apply or touch return get() ?: default().let { set(it); it } } - -/** - * Allows you to use the executor as a function to - * execute the given block on the [Executor]. - */ -@Deprecated("Use Executor.execute(Runnable) instead.") // do not specify ReplaceWith("execute(action)") due to KT-8597 -public operator fun Executor.invoke(action: () -> Unit) { - execute(action) -} - -/** - * Allows you to use the executor service as a function to - * execute the given block on the [ExecutorService]. - */ -@Deprecated("Use ExecutorService.submit(Callable) instead.") // do not specify ReplaceWith("submit(action)") due to KT-8597 -public operator fun ExecutorService.invoke(action: () -> T): Future { - return submit(action) -}