Skip to content

Instantly share code, notes, and snippets.

@af2905
Created October 24, 2023 20:25
Show Gist options
  • Save af2905/4fa4947295cebf54cea3827cb01ed03b to your computer and use it in GitHub Desktop.
Save af2905/4fa4947295cebf54cea3827cb01ed03b to your computer and use it in GitHub Desktop.
fun_receive_data_suspend
suspend fun receiveData(): String {
withContext(Dispatchers.IO) {
// Long asynchronous work is performed here.
}
return "Data received"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment