1 package kotlinx.coroutines 2 3 /** 4 * A [Runnable] that's especially optimized for running in [Dispatchers.Default] on the JVM. 5 * 6 * Replacing a [SchedulerTask] with a [Runnable] should not lead to any change in observable behavior. 7 * 8 * An arbitrary [Runnable], once it is dispatched by [Dispatchers.Default], gets wrapped into a class that 9 * stores the submission time, the execution context, etc. 10 * For [Runnable] instances that we know are only going to be executed in dispatch procedures, we can avoid the 11 * overhead of separately allocating a wrapper, and instead have the [Runnable] contain the required fields 12 * on construction. 13 * 14 * When running outside the standard dispatchers, these new fields are just dead weight. 15 */ 16 internal expect abstract class SchedulerTask internal constructor() : Runnable 17