Skip to content

Instantly share code, notes, and snippets.

@AndreVero
Last active October 7, 2024 14:46
Show Gist options
  • Save AndreVero/fb80e35f878649e8004577f0bc1d7915 to your computer and use it in GitHub Desktop.
Save AndreVero/fb80e35f878649e8004577f0bc1d7915 to your computer and use it in GitHub Desktop.
var counter = 0
val bitmap = async {
while (counter < 3) {
try {
return@async loadBitmap(url)
} catch (e: Exception) {
e.printStackTrace()
}
counter++
}
null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment