Last active
January 19, 2024 16:30
-
-
Save tdcolvin/5f0387d80f196191008d150c834312b7 to your computer and use it in GitHub Desktop.
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
suspend fun deleteAllNotes() = withContext(...) { | |
// Create a scope. The suspend function will return when *all* the | |
// scope's child coroutines finish. | |
coroutineScope { | |
launch { remoteDataSource.deleteAllNotes() } | |
launch { localDataSource.deleteAllNotes() } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment