Created
May 24, 2019 12:31
-
-
Save JoseAlcerreca/160e6b20cbcf4a0932649eba1d4f330b to your computer and use it in GitHub Desktop.
This file contains hidden or 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 getTask(taskId: String): Result<Task> { | |
EspressoIdlingResource.increment() // Set app as busy. | |
// Get off the main thread or suspend | |
return withContext(ioDispatcher) { … | |
EspressoIdlingResource.decrement() // Set app as idle. | |
return@withContext data | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment