Last active
March 26, 2020 15:01
-
-
Save garodrigues/26f7d58979d9289f298c160d405e847b 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
private suspend fun getWeatherDataByCity(cityName: String) { | |
val deferredResult = CoroutineScope(Dispatchers.IO).async { | |
// do what you need here | |
} | |
deferredResult.await() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment