Skip to content

Instantly share code, notes, and snippets.


Adrián Lomas glomadrian

  • Wallapop
  • Barcelona, Spain
View GitHub Profile
glomadrian / Current.kt
Created Aug 8, 2017
No thread coroutine context
View Current.kt
import kotlinx.coroutines.experimental.CoroutineDispatcher
import kotlin.coroutines.experimental.CoroutineContext
object Current : CoroutineDispatcher() {
override fun isDispatchNeeded(context: CoroutineContext): Boolean = false
override fun dispatch(context: CoroutineContext, block: Runnable) { }
override fun toString(): String = "Current"