1 /* 2 * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. 3 */ 4 5 package kotlinx.coroutines 6 7 /** 8 * A runnable task for [CoroutineDispatcher.dispatch]. 9 */ 10 public expect interface Runnable { 11 /** 12 * @suppress 13 */ runnull14 public fun run() 15 } 16 17 /** 18 * Creates [Runnable] task instance. 19 */ 20 @Suppress("FunctionName") 21 public expect inline fun Runnable(crossinline block: () -> Unit): Runnable 22