https://kotlinlang.org logo
#coroutines
Title
# coroutines
s

spierce7

10/22/2018, 10:51 PM
Is there a better way to create a
CoroutineContext
than this? I used to be able to do
CoroutineContext(Dispatcher)
, but that doesn't seem to work anymore.
Copy code
private val coroutineScope: CoroutineScope = object : CoroutineScope {
      private val context = Platform.createApiCoroutineDispatcher()

      override val coroutineContext: CoroutineContext
        get() = context
    }
2 Views