CoroutinesModule

@Module
class CoroutinesModule

Hilt module that provides coroutine dispatchers and scopes for dependency injection.

Note: This module is intended to be used by Hilt for providing coroutine-related dependencies when requested. You will never use this component directly, but rather, it is needed by Hilt to know how to provide the dependencies when requested.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
@Module
abstract class Bindings

Hilt module for binding the implementation of DispatchersProvider to its interface.

Functions

Link copied to clipboard
@Provides
fun provideDefaultCoroutineScope(dispatchersProvider: DispatchersProvider): CoroutineScope

Provides the default CoroutineScope using the DispatchersProvider.

Link copied to clipboard
@Provides
fun provideDefaultDispatcher(dispatchersProvider: DispatchersProvider): CoroutineDispatcher

Provides the default CoroutineDispatcher using the DispatchersProvider.

Link copied to clipboard
@Provides
fun provideIOCoroutineScope(dispatchersProvider: DispatchersProvider): CoroutineScope

Provides the IO CoroutineScope using the DispatchersProvider.

Link copied to clipboard
@Provides
fun provideIODispatcher(dispatchersProvider: DispatchersProvider): CoroutineDispatcher

Provides the IO CoroutineDispatcher using the DispatchersProvider.

Link copied to clipboard
@Provides
fun provideMainCoroutineScope(dispatchersProvider: DispatchersProvider): CoroutineScope

Provides the main CoroutineScope using the DispatchersProvider.

Link copied to clipboard
@Provides
fun provideMainDispatcher(dispatchersProvider: DispatchersProvider): CoroutineDispatcher

Provides the main CoroutineDispatcher using the DispatchersProvider.

Link copied to clipboard
@Provides
fun provideUnconfinedCoroutineScope(dispatchersProvider: DispatchersProvider): CoroutineScope

Provides the unconfined CoroutineScope using the DispatchersProvider.

Link copied to clipboard
@Provides
fun provideUnconfinedDispatcher(dispatchersProvider: DispatchersProvider): CoroutineDispatcher

Provides the unconfined CoroutineDispatcher using the DispatchersProvider.