CoroutineScopeProvider

Provides a coroutine scope to classes that need to launch coroutines. This module is installed in the SingletonComponent.

Functions

Link copied to clipboard
@Provides
fun provideCoroutineScope(): CoroutineScope

Provides the GlobalScope to coroutines that need to be executed outside the lifecycle of any specific instance. Use with caution, as coroutines launched with GlobalScope can be difficult to cancel and may lead to memory leaks if not properly handled. Consider using a more specific coroutine scope whenever possible.