Created
June 4, 2021 13:12
-
-
Save manuelvicnt/40b3abbeb7d710398640258b8ee569de 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
| @Retention(AnnotationRetention.RUNTIME) | |
| @Qualifier | |
| annotation class ApplicationScope | |
| @InstallIn(SingletonComponent::class) | |
| @Module | |
| object CoroutinesScopesModule { | |
| @Singleton | |
| @ApplicationScope | |
| @Provides | |
| fun providesCoroutineScope( | |
| @DefaultDispatcher defaultDispatcher: CoroutineDispatcher | |
| ): CoroutineScope = CoroutineScope(SupervisorJob() + defaultDispatcher) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment