-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make all IO async and use IO dispatcher (#72)
* Make all IO async and use IO dispatcher * fix async vs sync init test * Use dispatcher provider and mock all dispatchers * cleanup
- Loading branch information
1 parent
b51c3c5
commit a8642b1
Showing
17 changed files
with
454 additions
and
325 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
src/main/java/com/statsig/androidsdk/CoroutineDispatcherProvider.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 com.statsig.androidsdk | ||
|
||
import kotlinx.coroutines.CoroutineDispatcher | ||
import kotlinx.coroutines.Dispatchers | ||
|
||
data class CoroutineDispatcherProvider( | ||
val main: CoroutineDispatcher = Dispatchers.Main, | ||
val default: CoroutineDispatcher = Dispatchers.Default, | ||
val io: CoroutineDispatcher = Dispatchers.IO | ||
) |
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
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
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
Oops, something went wrong.