Skip to content

Instantly share code, notes, and snippets.

@garodrigues
Last active March 26, 2020 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garodrigues/26f7d58979d9289f298c160d405e847b to your computer and use it in GitHub Desktop.
Save garodrigues/26f7d58979d9289f298c160d405e847b to your computer and use it in GitHub Desktop.
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