This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyRepository(private val externalScope: CoroutineScope) { /* ... */ } | |
class MyApplication : Application() { | |
// Application-scoped types that any class in the app could access | |
// using the applicationContext. | |
val applicationScope = CoroutineScope(SupervisorJob() + Dispatchers.Default) | |
val myRepository = MyRepository(applicationScope) | |
} |
OlderNewer