Created
June 13, 2021 21:35
-
-
Save Jswizzy/f1b62182d1dbbcb3737b610f3b2e8654 to your computer and use it in GitHub Desktop.
This file contains hidden or 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) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment