-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
android/app/src/main/java/by/eapp/musicroom/data/DispatcherProviderImpl.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package by.eapp.musicroom.data | ||
|
||
import by.eapp.musicroom.domain.DispatcherProvider | ||
import kotlinx.coroutines.CoroutineDispatcher | ||
import kotlinx.coroutines.Dispatchers | ||
|
||
class DispatcherProviderImpl : DispatcherProvider { | ||
override val main: CoroutineDispatcher | ||
get() = Dispatchers.Main | ||
override val io: CoroutineDispatcher | ||
get() = Dispatchers.IO | ||
override val default: CoroutineDispatcher | ||
get() = Dispatchers.Default | ||
override val unconfined: CoroutineDispatcher | ||
get() = Dispatchers.Unconfined | ||
} |
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
10 changes: 10 additions & 0 deletions
10
android/app/src/main/java/by/eapp/musicroom/domain/DispatcherProvider.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package by.eapp.musicroom.domain | ||
|
||
import kotlinx.coroutines.CoroutineDispatcher | ||
|
||
interface DispatcherProvider { | ||
val main: CoroutineDispatcher | ||
val io: CoroutineDispatcher | ||
val default: CoroutineDispatcher | ||
val unconfined: CoroutineDispatcher | ||
} |